Skip to content

Commit d942877

Browse files
committed
[Yosyslib]: - set extra memory address unconn instead of gnd, so VPR pack memory slices
- add a autoname stage in Yosys synthesis script to avoid VPR misinferring the same signals as distinct ones - perform dffunmap and opt fast as the last stages before wrtiing BLIF Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent c7b5947 commit d942877

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

vtr_flow/misc/synthesis.ys

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ opt -full
6060
techmap
6161
opt -fast
6262

63-
flatten
64-
# Turn all DFFs into simple latches
65-
dffunmap
66-
opt -fast -noff
67-
6863
# We read the definitions for all the VTR primitives
6964
# as blackboxes
7065
read_verilog -lib TTT/adder.v
@@ -79,14 +74,19 @@ read_verilog -lib DDD #(DDD) will be replaced by dual_port_ram.v by python s
7974
read_verilog SSR #(SSR) will be replaced by spram_rename.v by python script
8075
read_verilog DDR #(DDR) will be replaced by dpram_rename.v by python script
8176

82-
77+
# Flatten the netlist
8378
flatten
79+
# Turn all DFFs into simple latches
80+
dffunmap
81+
opt -fast -noff
82+
8483
# Lastly, check the hierarchy for any unknown modules,
8584
# and purge all modules (including blackboxes) that
8685
# aren't used
8786
hierarchy -check -purge_lib
8887
tee -o /dev/stdout stat
8988

89+
autoname
9090

9191
# Then write it out as a blif file, remembering to call
9292
# the internal `$true'/`$false' signals vcc/gnd, but

vtr_flow/misc/yosyslib/dual_port_ram.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ module dual_port_ram(clk, we1, we2, addr1, addr2, data1, data2, out1, out2);
6767
.clk(clk),
6868
.we1(we1),
6969
.we2(we2),
70-
.addr1(addr1),
71-
.addr2(addr2),
70+
.addr1({ {{`MEM_MAXADDR-ADDR_WIDTH}{1'bx}}, addr1[ADDR_WIDTH-1:0] }),
71+
.addr2({ {{`MEM_MAXADDR-ADDR_WIDTH}{1'bx}}, addr2[ADDR_WIDTH-1:0] }),
7272
.data1(data1[i]),
7373
.data2(data2[i]),
7474
.out1(out1[i]),

vtr_flow/misc/yosyslib/single_port_ram.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module single_port_ram(clk, we, addr, data, out);
5555
singlePortRam uut (
5656
.clk(clk),
5757
.we(we),
58-
.addr(addr),
58+
.addr({ {{`MEM_MAXADDR-ADDR_WIDTH}{1'bx}}, addr[ADDR_WIDTH-1:0] }),
5959
.data(data[i]),
6060
.out(out[i])
6161
);

0 commit comments

Comments
 (0)