From 706631225e9ef0d2954c4bef51aaa2817e0f5e86 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 5 Apr 2015 09:45:14 +0200 Subject: Added $_MUX4_, $_MUX8_, and $_MUX16_ cell types --- kernel/celltypes.h | 12 ++++++++++-- kernel/rtlil.cc | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/celltypes.h b/kernel/celltypes.h index 533c370fe..afdbda5d7 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -95,7 +95,6 @@ struct CellTypes "$add", "$sub", "$mul", "$div", "$mod", "$pow", "$logic_and", "$logic_or", "$concat", "$macc" }; - IdString A = "\\A", B = "\\B", S = "\\S", Y = "\\Y"; IdString P = "\\P", G = "\\G", C = "\\C", X = "\\X"; IdString BI = "\\BI", CI = "\\CI", CO = "\\CO", EN = "\\EN"; @@ -144,7 +143,13 @@ struct CellTypes void setup_stdcells() { - IdString A = "\\A", B = "\\B", C = "\\C", D = "\\D", S = "\\S", Y = "\\Y"; + IdString A = "\\A", B = "\\B", C = "\\C", D = "\\D"; + IdString E = "\\E", F = "\\F", G = "\\G", H = "\\H"; + IdString I = "\\I", J = "\\J", K = "\\K", L = "\\L"; + IdString M = "\\I", N = "\\N", O = "\\O", P = "\\P"; + IdString S = "\\S", T = "\\T", U = "\\U", V = "\\V"; + IdString Y = "\\Y"; + setup_type("$_BUF_", {A}, {Y}, true); setup_type("$_NOT_", {A}, {Y}, true); setup_type("$_AND_", {A, B}, {Y}, true); @@ -154,6 +159,9 @@ struct CellTypes setup_type("$_XOR_", {A, B}, {Y}, true); setup_type("$_XNOR_", {A, B}, {Y}, true); setup_type("$_MUX_", {A, B, S}, {Y}, true); + setup_type("$_MUX4_", {A, B, C, D, S, T}, {Y}, true); + setup_type("$_MUX8_", {A, B, C, D, E, F, G, H, S, T, U}, {Y}, true); + setup_type("$_MUX16_", {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, S, T, U, V}, {Y}, true); setup_type("$_AOI3_", {A, B, C}, {Y}, true); setup_type("$_OAI3_", {A, B, C}, {Y}, true); setup_type("$_AOI4_", {A, B, C, D}, {Y}, true); diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index adf89a245..6de5846f9 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -970,6 +970,10 @@ namespace { if (cell->type == "$_AOI4_") { check_gate("ABCDY"); return; } if (cell->type == "$_OAI4_") { check_gate("ABCDY"); return; } + if (cell->type == "$_MUX4_") { check_gate("ABCDSTY"); return; } + if (cell->type == "$_MUX8_") { check_gate("ABCDEFGHSTUY"); return; } + if (cell->type == "$_MUX16_") { check_gate("ABCDEFGHIJKLMNOPSTUVY"); return; } + if (cell->type == "$_SR_NN_") { check_gate("SRQ"); return; } if (cell->type == "$_SR_NP_") { check_gate("SRQ"); return; } if (cell->type == "$_SR_PN_") { check_gate("SRQ"); return; } -- cgit v1.2.3