mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-13 16:06:40 +00:00
Split sim models into multiple files and implement few
This commit is contained in:
parent
04d3672121
commit
f9f68c3cd1
8 changed files with 84 additions and 83 deletions
30
techlibs/nanoxplore/cells_sim_u.v
Normal file
30
techlibs/nanoxplore/cells_sim_u.v
Normal file
|
@ -0,0 +1,30 @@
|
|||
module NX_GCK_U(SI1, SI2, CMD, SO);
|
||||
input CMD;
|
||||
input SI1;
|
||||
input SI2;
|
||||
output SO;
|
||||
parameter inv_in = 1'b0;
|
||||
parameter inv_out = 1'b0;
|
||||
parameter std_mode = "BYPASS";
|
||||
|
||||
wire SI1_int = inv_in ? ~SI1 : SI1;
|
||||
wire SI2_int = inv_in ? ~SI2 : SI2;
|
||||
|
||||
wire SO_int;
|
||||
generate if (std_mode == "BYPASS") begin
|
||||
assign SO_int = SI1_int;
|
||||
end
|
||||
else if (std_mode == "MUX") begin
|
||||
assign SO_int = CMD ? SI1_int : SI2_int;
|
||||
end
|
||||
else if (std_mode == "CKS") begin
|
||||
assign SO_int = CMD ? SI1_int : 1'b0;
|
||||
end
|
||||
else if (std_mode == "CSC") begin
|
||||
assign SO_int = CMD;
|
||||
end
|
||||
else
|
||||
$error("Unrecognised std_mode");
|
||||
endgenerate
|
||||
assign SO = inv_out ? ~SO_int : SO_int;
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue