aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/anlogic/cells_sim.v
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-12-01 18:28:54 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2018-12-01 18:28:54 +0100
commit83bce9f59c2ae54038f1cf2938fd095e7039c38a (patch)
tree1e5010e614646cb4262e79c90ec9e2b74dbd5be9 /techlibs/anlogic/cells_sim.v
parent47c89d600c11aee97e325351d295781169d62978 (diff)
downloadyosys-83bce9f59c2ae54038f1cf2938fd095e7039c38a.tar.gz
yosys-83bce9f59c2ae54038f1cf2938fd095e7039c38a.tar.bz2
yosys-83bce9f59c2ae54038f1cf2938fd095e7039c38a.zip
Initial support for Anlogic FPGA
Diffstat (limited to 'techlibs/anlogic/cells_sim.v')
-rw-r--r--techlibs/anlogic/cells_sim.v103
1 files changed, 103 insertions, 0 deletions
diff --git a/techlibs/anlogic/cells_sim.v b/techlibs/anlogic/cells_sim.v
new file mode 100644
index 000000000..60a367928
--- /dev/null
+++ b/techlibs/anlogic/cells_sim.v
@@ -0,0 +1,103 @@
+module AL_MAP_SEQ (
+ output q,
+ input ce,
+ input clk,
+ input sr,
+ input d
+);
+ parameter DFFMODE = "FF"; //FF,LATCH
+ parameter REGSET = "RESET"; //RESET/SET
+ parameter SRMUX = "SR"; //SR/INV
+ parameter SRMODE = "SYNC"; //SYNC/ASYNC
+endmodule
+
+module AL_MAP_LUT1 (
+ output o,
+ input a
+);
+ parameter [1:0] INIT = 2'h0;
+ parameter EQN = "(A)";
+ assign Y = INIT >> A;
+endmodule
+
+module AL_MAP_LUT2 (
+ output o,
+ input a,
+ input b
+);
+ parameter [3:0] INIT = 4'h0;
+ parameter EQN = "(A)";
+ assign o = INIT >> {b, a};
+endmodule
+
+module AL_MAP_LUT3 (
+ output o,
+ input a,
+ input b,
+ input c
+);
+ parameter [7:0] INIT = 8'h0;
+ parameter EQN = "(A)";
+ assign o = INIT >> {c, b, a};
+endmodule
+
+module AL_MAP_LUT4 (
+ output o,
+ input a,
+ input b,
+ input c,
+ input d
+);
+ parameter [15:0] INIT = 16'h0;
+ parameter EQN = "(A)";
+ assign o = INIT >> {d, c, b, a};
+endmodule
+
+module AL_MAP_LUT5 (
+ output o,
+ input a,
+ input b,
+ input c,
+ input d,
+ input e
+);
+ parameter [31:0] INIT = 32'h0;
+ parameter EQN = "(A)";
+ assign o = INIT >> {e, d, c, b, a};
+endmodule
+
+
+module AL_MAP_LUT6 (
+ output o,
+ input a,
+ input b,
+ input c,
+ input d,
+ input e,
+ input f
+);
+ parameter [63:0] INIT = 64'h0;
+ parameter EQN = "(A)";
+ assign o = INIT >> {f, e, d, c, b, a};
+endmodule
+
+module AL_MAP_ALU2B (
+ input cin,
+ input a0, b0, c0, d0,
+ input a1, b1, c1, d1,
+ output s0, s1, cout
+);
+ parameter [15:0] INIT0 = 16'h0000;
+ parameter [15:0] INIT1 = 16'h0000;
+ parameter FUNC0 = "NO";
+ parameter FUNC1 = "NO";
+endmodule
+
+module AL_MAP_ADDER (
+ input a,
+ input b,
+ input c,
+ output [1:0] o
+);
+ parameter ALUTYPE = "ADD";
+endmodule