diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/celltypes.h | 2 | ||||
| -rw-r--r-- | kernel/rtlil.cc | 15 | 
2 files changed, 17 insertions, 0 deletions
| diff --git a/kernel/celltypes.h b/kernel/celltypes.h index f8c73ed83..4e91eddda 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -86,6 +86,7 @@ struct CellTypes  		IdString A = "\\A", B = "\\B", EN = "\\EN", Y = "\\Y";  		IdString SRC = "\\SRC", DST = "\\DST", DAT = "\\DAT"; +		IdString EN_SRC = "\\EN_SRC", EN_DST = "\\EN_DST";  		setup_type("$tribuf", {A, EN}, {Y}, true); @@ -102,6 +103,7 @@ struct CellTypes  		setup_type("$equiv", {A, B}, {Y}, true);  		setup_type("$specify2", {EN, SRC, DST}, pool<RTLIL::IdString>(), true);  		setup_type("$specify3", {EN, SRC, DST, DAT}, pool<RTLIL::IdString>(), true); +		setup_type("$specrule", {EN_SRC, EN_DST, SRC, DST}, pool<RTLIL::IdString>(), true);  	}  	void setup_internals_eval() diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 4522b0a08..dae3698a9 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1218,6 +1218,21 @@ namespace {  				return;  			} +			if (cell->type == "$specrule") { +				param_bool("\\SRC_PEN"); +				param_bool("\\SRC_POL"); +				param_bool("\\DST_PEN"); +				param_bool("\\DST_POL"); +				param_bool("\\LIMIT_GT"); +				param("\\T_LIMIT"); +				port("\\SRC_EN", 1); +				port("\\DST_EN", 1); +				port("\\SRC", param("\\SRC_WIDTH")); +				port("\\DST", param("\\DST_WIDTH")); +				check_expected(); +				return; +			} +  			if (cell->type == "$_BUF_")    { check_gate("AY"); return; }  			if (cell->type == "$_NOT_")    { check_gate("AY"); return; }  			if (cell->type == "$_AND_")    { check_gate("ABY"); return; } | 
