mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-21 10:41:37 +00:00
Added very first version of "synth_ice40"
This commit is contained in:
parent
ed15400fc6
commit
42d5d94a5d
4 changed files with 211 additions and 0 deletions
12
techlibs/ice40/cells_sim.v
Normal file
12
techlibs/ice40/cells_sim.v
Normal file
|
@ -0,0 +1,12 @@
|
|||
module SB_LUT4(output O, input I0, I1, I2, I3);
|
||||
parameter [15:0] INIT = 0;
|
||||
wire [ 7: 0] s3 = I3 ? INIT[15: 8] : INIT[ 7: 0];
|
||||
wire [ 3: 0] s2 = I2 ? s3[ 7: 4] : s3[ 3: 0];
|
||||
wire [ 1: 0] s1 = I1 ? s2[ 3: 2] : s2[ 1: 0];
|
||||
assign O = I0 ? s1[1] : s1[0];
|
||||
endmodule
|
||||
|
||||
module SB_DFF (output reg Q, input C, D);
|
||||
always @(posedge C)
|
||||
Q <= D;
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue