Skip to content

Commit

Permalink
Merge pull request #135 from zeroasiccorp/ali/fixes
Browse files Browse the repository at this point in the history
Fixes to fifo flex merge logic and to conform to lambdalib
  • Loading branch information
aolofsson authored Jun 5, 2024
2 parents fd86f0f + 1c67e3a commit 9092f21
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ to the TX of the host (and vice versa).](docs/_images/swizzle_lumi.png)
#### nreset

Asynchronous active low reset. To prevent power up and initialization issues the device 'nreset' pin must be sampled by a synchronizer with asynchronous assert and synchronous deassert logic.
[REF](https://github.com/siliconcompiler/lambdalib/blob/main/stdlib/rtl/la_rsync.v)
[REF](https://github.com/siliconcompiler/lambdalib/blob/main/lambdalib/auxlib/rtl/la_rsync.v)

#### clk

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ requires-python = ">= 3.8"
license = {file = "LICENSE"}
dependencies = [
"siliconcompiler>=0.21.0",
"lambdalib==0.2.3"
"lambdalib==0.2.4"
]
dynamic = [
"version"
Expand Down
2 changes: 2 additions & 0 deletions umi/lumi/rtl/lumi_rx.v
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ module lumi_rx
// Inputs
.clk (ioclk),
.nreset (ionreset),
.clear (1'b0),
.vss (1'b0),
.vdd (1'b1),
.chaosmode (1'b0),
Expand Down Expand Up @@ -605,6 +606,7 @@ module lumi_rx
// Inputs
.clk (ioclk),
.nreset (ionreset),
.clear (1'b0),
.vss (1'b0),
.vdd (1'b1),
.chaosmode (1'b0),
Expand Down
2 changes: 1 addition & 1 deletion umi/lumi/testbench/test_lumi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def build_testbench(topo="2d", trace=False):

dut.use(umi)
dut.add('option', 'library', ['lumi', 'umi'])
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')
dut.add('option', 'library', 'lambdalib_vectorlib')

Expand Down
2 changes: 1 addition & 1 deletion umi/lumi/testbench/test_lumi_rnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def build_testbench(topo="2d", trace=False):

dut.use(umi)
dut.add('option', 'library', ['lumi', 'umi'])
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')
dut.add('option', 'library', 'lambdalib_vectorlib')

Expand Down
5 changes: 3 additions & 2 deletions umi/umi/rtl/umi_fifo_flex.v
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ module umi_fifo_flex

assign tx_mergeable = opcode_mergeable & misc_mergeable &
dstaddr_mergeable & srcaddr_mergeable &
len_mergeable;
len_mergeable & (latch_bytes != 0);

reg packet_latch_eom;
wire packet_boundary;
Expand Down Expand Up @@ -607,6 +607,7 @@ module umi_fifo_flex
// Inputs
.clk (umi_in_clk),
.nreset (umi_in_nreset),
.clear (1'b0),
.wr_din (fifo_din[ODW+AW+AW+CW-1:0]),
.wr_en (fifo_write),
.chaosmode (chaosmode),
Expand Down Expand Up @@ -639,7 +640,7 @@ module umi_fifo_flex
assign fifo_empty = (bypass | ~(|DEPTH)) ? 1'b1 : fifo_empty_raw;

assign umi_out_cmd[CW-1:0] = (bypass | ~(|DEPTH)) ? latch2fifo_cmd[CW-1:0] : fifo_dout[CW-1:0];
assign umi_out_dstaddr[AW-1:0] = (bypass | ~(|DEPTH)) ? latch2fifo_dstaddr[AW-1:0] : fifo_dout[CW+:AW] & 64'hFFFF_FFFF_FFFF_FFFF;
assign umi_out_dstaddr[AW-1:0] = (bypass | ~(|DEPTH)) ? latch2fifo_dstaddr[AW-1:0] : fifo_dout[CW+:AW] & {AW{1'b1}};
assign umi_out_srcaddr[AW-1:0] = (bypass | ~(|DEPTH)) ? latch2fifo_srcaddr[AW-1:0] : fifo_dout[CW+AW+:AW];
assign umi_out_data[ODW-1:0] = (bypass | ~(|DEPTH)) ? latch2fifo_data[ODW-1:0] : fifo_dout[CW+AW+AW+:ODW];

Expand Down
2 changes: 1 addition & 1 deletion umi/umi/testbench/test_crossbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build_testbench():

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')
dut.add('option', 'library', 'lambdalib_vectorlib')

Expand Down
2 changes: 1 addition & 1 deletion umi/umi/testbench/test_fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_testbench():

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')

# Verilator configuration
Expand Down
2 changes: 1 addition & 1 deletion umi/umi/testbench/test_fifo_flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_testbench(split=False):

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')

dut.add('option', 'define', f'SPLIT={int(split)}')
Expand Down
2 changes: 1 addition & 1 deletion umi/umi/testbench/test_mem_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build_testbench():

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')

# Verilator configuration
Expand Down
1 change: 0 additions & 1 deletion umi/umi/testbench/test_regif.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def build_testbench():

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_ramlib')

# Verilator configuration
Expand Down
2 changes: 1 addition & 1 deletion umi/umi/testbench/test_umi_ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build_testbench():

dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_ramlib')
dut.add('option', 'library', 'lambdalib_vectorlib')

Expand Down
1 change: 1 addition & 0 deletions umi/utils/rtl/tl2umi_np.v
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ module tl2umi_np #(
) tl2umi_req_fifo (
.clk (clk),
.nreset (nreset),
.clear (1'b0),

.vss (1'b0),
.vdd (1'b1),
Expand Down
2 changes: 1 addition & 1 deletion umi/utils/testbench/tb_tl2umi_np.v
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ module tb_tl2umi_np #(
// control block
initial begin
r = $value$plusargs("MEMHFILE=%s", memhfile);
$readmemh(memhfile, memory_module_.la_spram_i.ram);
$readmemh(memhfile, memory_module_.la_spram.ram);
$timeformat(-9, 0, " ns", 20);
$dumpfile("waveform.vcd");
$dumpvars();
Expand Down
2 changes: 1 addition & 1 deletion umi/utils/testbench/test_tl2umi_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build():
chip.input('utils/testbench/tb_tl2umi_np.v', package='umi')

chip.add('option', 'library', 'umi')
chip.add('option', 'library', 'lambdalib_stdlib')
chip.add('option', 'library', 'lambdalib_auxlib')
chip.add('option', 'library', 'lambdalib_ramlib')
chip.add('option', 'library', 'lambdalib_vectorlib')

Expand Down
2 changes: 1 addition & 1 deletion umi/utils/testbench/test_umi2axilite.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build_testbench():
dut.use(umi)
dut.add('option', 'library', 'umi')
dut.add('option', 'library', 'lambdalib_ramlib')
dut.add('option', 'library', 'lambdalib_stdlib')
dut.add('option', 'library', 'lambdalib_auxlib')
dut.add('option', 'library', 'lambdalib_vectorlib')

# Verilator configuration
Expand Down
2 changes: 1 addition & 1 deletion umi/utils/testbench/test_umi2tl_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def build_testbench(topo="2d"):
dut.input('utils/testbench/tlmemsim.cpp', package='umi')

dut.use(umi)
dut.add('option', 'library', ['umi', 'lambdalib_stdlib'])
dut.add('option', 'library', ['umi', 'lambdalib_auxlib'])

# Verilator configuration
dut.add('tool', 'verilator', 'task', 'compile', 'option', '--coverage')
Expand Down

0 comments on commit 9092f21

Please sign in to comment.