Browse Source

Full fork, new sample

master
Sadoon Al-Bader 1 year ago
parent
commit
1a8f9c84b4
  1. 5
      Makefile
  2. 38
      full_adder_tb.vcd
  3. 84546
      plasma.vcd
  4. 294
      sample.vcd
  5. 8
      vcd.c

5
Makefile

@ -0,0 +1,5 @@
all: comp
comp:
gcc -Wall -Werror -o vcd vcd.c
clean:
rm -rf ./vcd

38
full_adder_tb.vcd

@ -0,0 +1,38 @@
$date
Mon Jul 6 02:50:33 2020
$end
$version
Icarus Verilog
$end
$timescale
1ns
$end
$scope module full_adder_tb $end
$scope module FA_tb $end
$var wire 8 ! i_a [7:0] $end
$var wire 8 " i_b [7:0] $end
$var wire 1 # i_carry $end
$var wire 8 $ o_sum [7:0] $end
$var wire 1 % o_carry $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
0%
b0 $
0#
b0 "
b0 !
$end
#20
b1010000 $
b110010 "
b11110 !
#40
b11111111 $
1%
1#
b11111111 "
b11111111 !
#60

84546
plasma.vcd

File diff suppressed because it is too large

294
sample.vcd

@ -1,294 +0,0 @@
$date
Fri Nov 21 16:56:29 2014
$end
$version
GHDL v0
$end
$timescale
1 fs
$end
$var reg 1 ! e_clk $end
$var reg 1 " e_rst $end
$var reg 1 # e_ren $end
$var reg 1 $ e_wen $end
$var reg 4 % e_d[3:0] $end
$var reg 4 & e_q[3:0] $end
$var reg 1 ' e_empty $end
$var reg 1 ( e_mid $end
$var reg 1 ) e_full $end
$scope module fifo1 $end
$var reg 1 * clk $end
$var reg 1 + rst $end
$var reg 1 , ren $end
$var reg 1 - wen $end
$var reg 4 . d[3:0] $end
$var reg 4 / q[3:0] $end
$var reg 1 0 empty $end
$var reg 1 1 mid $end
$var reg 1 2 full $end
$comment regs is not handled $end
$var reg 2 3 w_adr[1:0] $end
$var reg 2 4 r_adr[1:0] $end
$upscope $end
$enddefinitions $end
#0
1!
0"
1#
1$
bZZZZ %
bUUUU &
U'
U(
U)
1*
0+
1,
1-
bZZZZ .
bUUUU /
U0
U1
U2
bUU 3
bUU 4
#5000000
0!
0*
#10000000
1!
bZZZZ &
1'
0(
0)
1*
bZZZZ /
10
01
02
b00 3
b00 4
#15000000
0!
1"
0*
1+
#20000000
1!
1*
#25000000
0!
0#
0$
b0001 %
0*
0,
0-
b0001 .
#30000000
1!
b0000 &
0'
1*
b0000 /
00
b01 3
#35000000
0!
1$
bZZZZ %
0*
1-
bZZZZ .
#40000000
1!
b0001 &
1'
1*
b0001 /
10
b01 4
#45000000
0!
1#
0*
1,
#50000000
1!
bZZZZ &
1*
bZZZZ /
#55000000
0!
0$
b0010 %
0*
0-
b0010 .
#60000000
1!
0'
1*
00
b10 3
#65000000
0!
b0011 %
0*
b0011 .
#70000000
1!
1(
1*
11
b11 3
#75000000
0!
b0100 %
0*
b0100 .
#80000000
1!
1*
b00 3
#85000000
0!
b0101 %
0*
b0101 .
#90000000
1!
1)
1*
12
b01 3
#95000000
0!
1$
bZZZZ %
0*
1-
bZZZZ .
#100000000
1!
1*
#105000000
0!
0$
b0110 %
0*
0-
b0110 .
#110000000
1!
1*
b10 3
b10 4
#115000000
0!
1$
bZZZZ %
0*
1-
bZZZZ .
#120000000
1!
1*
#125000000
0!
0#
0$
b0111 %
0*
0,
0-
b0111 .
#130000000
1!
b0011 &
1*
b0011 /
b11 3
b11 4
#135000000
0!
1#
1$
bZZZZ %
0*
1,
1-
bZZZZ .
#140000000
1!
bZZZZ &
1*
bZZZZ /
#145000000
0!
0#
0*
0,
#150000000
1!
b0100 &
0)
1*
b0100 /
02
b00 4
#155000000
0!
0*
#160000000
1!
b0101 &
1*
b0101 /
b01 4
#165000000
0!
0*
#170000000
1!
b0110 &
0(
1*
b0110 /
01
b10 4
#175000000
0!
0*
#180000000
1!
b0111 &
1'
1*
b0111 /
10
b11 4
#185000000
0!
0*
#190000000
1!
b0000 &
1*
b0000 /
#195000000
0!
1#
0*
1,
#200000000
1!
bZZZZ &
1*
bZZZZ /
#205000000
0!
0*
#210000000
1!
1*

8
vcd.c

@ -85,7 +85,7 @@ void parseInst(Parameters*params,Parser*p){
if(!strcmp("var",token)){
char id_str[4];
Channel chan={};
fscanf(params->fin," reg %d %3[^ ] %"TXT(MAX_NAME)"[^ $]",&(chan.size),id_str,chan.name);
fscanf(params->fin," wire %d %3[^ ] %"TXT(MAX_NAME)"[^]$]",&(chan.size),id_str,chan.name);
int id=char2id(id_str);
p->ch[id]=chan;//printf("size=%i <%c> name=<%s>\n",size,id,data);
p->ch[id].scope=p->cur_scopes;
@ -168,19 +168,19 @@ void parseFile(Parameters*params,Parser*p){
void showVertical(Parameters*params,Parser*p){
int chan,smpl,w;
if(p->nb )fprintf(params->fout,"%i samples",p->nb);
if(p->date [0])fprintf(params->fout," / %s",p->date);
if(p->scale[0])fprintf(params->fout," / %s",p->scale);
fprintf(params->fout,"\n");
for(chan=0;chan < COUNT(p->ch);chan++){
if(!p->ch[chan].size)continue;//skip empty ch
if(params->scope && (!p->ch[chan].scope || !strstr(params->scope,p->scopes[p->ch[chan].scope])))
continue;//skip root node or unrelated node if scope-only wanted
if((!chan && p->ch[chan].scope) || (chan>0 && (p->ch[chan].scope!=p->ch[chan-1].scope)))
fprintf(params->fout,"┌── %s\n",p->ch[chan].scope?p->scopes[p->ch[chan].scope]:"");
fprintf(params->fout,"%s %*.*s[%2i]: ",p->ch[chan].scope?"":" ",params->colsize,params->colsize,p->ch[chan].name,p->ch[chan].size);
for(smpl=0;smpl < p->nb ;smpl++){
char type = p->ch[chan].type[smpl];

Loading…
Cancel
Save