Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stable rs feature branch merge (#2125)
Squash-merge of a feature branch ( https://github.com/alaindargelas/synlig/tree/stable_rs ) New features, bug fixes and tests (added in `tests/simple_tests` and the passlist). * Update to latest UHDM/Surelog * Fix parameter type bug * BlackBox attribute support * int pattern assign support * Rewrite rule for for_loop * Latch fix * Package enum const pushing * Struct and multi-dim hier path * process_logic_var trial * struct instance hier path * address assert * logic_var accepted in packed_array_var * packed_array_var fix * Support for 3 signals in sensitivity list
- Loading branch information
1 parent
bde80c8
commit 43c3fe4
Showing
52 changed files
with
675 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEST_FILES := $(TEST_DIR)/cells.sv $(TEST_DIR)/dut.sv | ||
TOP_MODULE := dut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
`celldefine | ||
(* blackbox *) | ||
module I_BUF #( | ||
parameter WEAK_KEEPER = "NONE", | ||
parameter DRIVE = "STRONG" | ||
) ( | ||
input logic I, | ||
input logic EN, | ||
output logic O | ||
); | ||
|
||
endmodule | ||
`endcelldefine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module dut(input logic clk, input logic I, | ||
input logic EN, | ||
output logic O1, O2); | ||
|
||
I_BUF ibuf1(I, EN, O1); | ||
|
||
I_BUF #(.WEAK_KEEPER("PULLUP")) ibuf2 (I, EN, O2); | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source ../yosys_common.tcl | ||
|
||
prep -top \\dut | ||
write_verilog | ||
write_verilog yosys.sv | ||
# The sim command does not work for designs with blackbox, | ||
# it does not allow to add the blackboxes actual models back into the simulation | ||
# sim -clock clk -rstlen 10 -vcd dump.vcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEST_FILES := $(TEST_DIR)/dut.sv | ||
TOP_MODULE := dut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package prim_pad_wrapper_pkg; | ||
typedef enum logic [2:0] { | ||
BidirStd = 3'h0 | ||
} pad_type_e; | ||
typedef logic [7:0] pad_pok_t; | ||
endpackage : prim_pad_wrapper_pkg | ||
|
||
module prim_pad_wrapper | ||
import prim_pad_wrapper_pkg::*; (input pad_pok_t pok_i, output pad_pok_t pok_o); | ||
assign pok_o = pok_i; | ||
endmodule : prim_pad_wrapper | ||
|
||
module dut | ||
import prim_pad_wrapper_pkg::*; | ||
#(parameter logic [0:0][1:0] DioPadBank = '0) | ||
(input logic clk, | ||
input pad_pok_t [3:0] pad_pok_i, | ||
output pad_pok_t [3:0] pad_pok_o); | ||
|
||
prim_pad_wrapper u_dio_pad ( | ||
.pok_i ( pad_pok_i[DioPadBank[0]] ), | ||
.pok_o ( pad_pok_o[DioPadBank[0]] ) | ||
); | ||
endmodule : dut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source ../yosys_common.tcl | ||
|
||
prep -top \\dut | ||
write_verilog | ||
write_verilog yosys.sv | ||
sim -clock clk -rstlen 10 -vcd dump.vcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEST_FILES := $(TEST_DIR)/dut.sv | ||
TOP_MODULE := dut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
`default_nettype none | ||
module dut #(parameter WIDTH=32, SELW=1, CTRLW=$clog2(WIDTH), DINW=2**SELW) | ||
(input wire clk, | ||
input wire [CTRLW-1:0] ctrl, | ||
input wire [DINW-1:0] din, | ||
input wire [SELW-1:0] sel, | ||
output reg [WIDTH-1:0] dout); | ||
|
||
localparam SLICE = WIDTH/(SELW**2); | ||
always @(posedge clk) begin | ||
dout <= dout + 1; | ||
dout[ctrl*sel+:SLICE] <= din ; | ||
end | ||
|
||
endmodule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source ../yosys_common.tcl | ||
|
||
prep -top \\dut | ||
write_verilog | ||
write_verilog yosys.sv | ||
sim -clock clk -rstlen 10 -vcd dump.vcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEST_FILES := $(TEST_DIR)/dut.sv | ||
TOP_MODULE := dut |
Oops, something went wrong.