Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #745 from antmicro/kr/MultirangesStartNotFromZero
Browse files Browse the repository at this point in the history
Add MultirangesStartNotFromZero test
  • Loading branch information
Mariusz Glebocki authored Aug 29, 2023
2 parents 6d09510 + 908d211 commit b015b4c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/MultirangesStartNotFromZero/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TOP_FILE := $(TEST_DIR)/top.sv
TOP_MODULE := top
32 changes: 32 additions & 0 deletions tests/MultirangesStartNotFromZero/top.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module top();
typedef struct packed {
logic v;
logic ready_and_rev;
logic [66-1:0] data;
} bp_mem_ready_and_link_t;
logic [1-1:0][68-1:0] mem_fwd_link_i;
logic [1-1:0][68-1:0] mem_rev_link_o;
logic [1-1:0][68-1:0] mem_dma_link_o;
typedef enum logic[2:0] {p_e=3'd0, w_e, e_e, n_e, s_e} Dirs;
bp_mem_ready_and_link_t [s_e:n_e][1-1:0] mem_ver_link_lo;

assign mem_rev_link_o = mem_ver_link_lo[n_e];
assign mem_ver_link_lo[s_e] = mem_fwd_link_i;
assign mem_dma_link_o = mem_ver_link_lo[s_e];
typedef struct packed {
logic v;
logic ready_and_rev;
logic [66-1:0] data;
} bp_io_ready_and_link_t;
bp_io_ready_and_link_t [1-1:0][e_e:w_e] io_fwd_link_li;
bp_io_ready_and_link_t [1-1:0][e_e:w_e] io_fwd_link_lo;
bp_io_ready_and_link_t [1-1:0][e_e:w_e] io_rev_link_li;
bp_io_ready_and_link_t [1-1:0][e_e:w_e] io_rev_link_lo;
bp_io_ready_and_link_t [1-1:0][s_e:w_e] io_fwd_mesh_lo;
bp_io_ready_and_link_t [1-1:0][s_e:w_e] io_fwd_mesh_li;
assign io_fwd_mesh_lo[0][e_e:w_e] = io_fwd_link_lo[0][e_e:w_e];
for (genvar i = 0; i < 1; i++)
begin : gen_cmd_link
assign io_fwd_link_li[i][e_e:w_e] = io_fwd_mesh_li[i][e_e:w_e];
end
endmodule
4 changes: 4 additions & 0 deletions tests/MultirangesStartNotFromZero/yosys_script.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source ../yosys_common.tcl

write_verilog
write_verilog yosys.sv

0 comments on commit b015b4c

Please sign in to comment.