mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-02 20:31:22 +00:00
Merge branch 'master' into eddie/xilinx_srl
This commit is contained in:
commit
1ba09c4ab7
4 changed files with 125 additions and 28 deletions
117
CHANGELOG
117
CHANGELOG
|
@ -12,7 +12,10 @@ Yosys 0.9 .. Yosys 0.9-dev
|
||||||
- Added "synth_xilinx -abc9" (experimental)
|
- Added "synth_xilinx -abc9" (experimental)
|
||||||
- Added "synth_ice40 -abc9" (experimental)
|
- Added "synth_ice40 -abc9" (experimental)
|
||||||
- Added "synth -abc9" (experimental)
|
- Added "synth -abc9" (experimental)
|
||||||
- Added "script -scriptwire
|
- Added "script -scriptwire"
|
||||||
|
- Added "synth_xilinx -nocarry"
|
||||||
|
- Added "synth_xilinx -nowidelut"
|
||||||
|
- Added "synth_ecp5 -nowidelut"
|
||||||
- "synth_xilinx" to now infer wide multiplexers (-widemux <min> to enable)
|
- "synth_xilinx" to now infer wide multiplexers (-widemux <min> to enable)
|
||||||
- Renamed labels/options in synth_ice40 (e.g. dram -> map_lutram; -nodram -> -nolutram)
|
- Renamed labels/options in synth_ice40 (e.g. dram -> map_lutram; -nodram -> -nolutram)
|
||||||
- Renamed labels/options in synth_ecp5 (e.g. dram -> map_lutram; -nodram -> -nolutram)
|
- Renamed labels/options in synth_ecp5 (e.g. dram -> map_lutram; -nodram -> -nolutram)
|
||||||
|
@ -31,32 +34,124 @@ Yosys 0.9 .. Yosys 0.9-dev
|
||||||
- Added "xilinx_srl" for Xilinx shift register extraction
|
- Added "xilinx_srl" for Xilinx shift register extraction
|
||||||
- Removed "shregmap -tech xilinx" (superseded by "xilinx_srl")
|
- Removed "shregmap -tech xilinx" (superseded by "xilinx_srl")
|
||||||
|
|
||||||
Yosys 0.8 .. Yosys 0.8-dev
|
Yosys 0.8 .. Yosys 0.9
|
||||||
--------------------------
|
----------------------
|
||||||
|
|
||||||
* Various
|
* Various
|
||||||
- Added $changed support to read_verilog
|
- Many bugfixes and small improvements
|
||||||
|
- Added support for SystemVerilog interfaces and modports
|
||||||
- Added "write_edif -attrprop"
|
- Added "write_edif -attrprop"
|
||||||
- Added "ice40_unlut" pass
|
|
||||||
- Added "opt_lut" pass
|
- Added "opt_lut" pass
|
||||||
- Added "synth_ice40 -relut"
|
|
||||||
- Added "synth_ice40 -noabc"
|
|
||||||
- Added "gate2lut.v" techmap rule
|
- Added "gate2lut.v" techmap rule
|
||||||
- Added "rename -src"
|
- Added "rename -src"
|
||||||
- Added "equiv_opt" pass
|
- Added "equiv_opt" pass
|
||||||
- Added "shregmap -tech xilinx"
|
- Added "flowmap" LUT mapping pass
|
||||||
|
- Added "rename -wire" to rename cells based on the wires they drive
|
||||||
|
- Added "bugpoint" for creating minimised testcases
|
||||||
|
- Added "write_edif -gndvccy"
|
||||||
|
- "write_verilog" to escape Verilog keywords
|
||||||
|
- Fixed sign handling of real constants
|
||||||
|
- "write_verilog" to write initial statement for initial flop state
|
||||||
|
- Added pmgen pattern matcher generator
|
||||||
|
- Fixed opt_rmdff handling of $_DFFSR_???_ and $_DLATCHSR_???_
|
||||||
|
- Added "setundef -params" to replace undefined cell parameters
|
||||||
|
- Renamed "yosys -D" to "yosys -U", added "yosys -D" to set Verilog defines
|
||||||
|
- Fixed handling of defparam when default_nettype is none
|
||||||
|
- Fixed "wreduce" flipflop handling
|
||||||
|
- Fixed FIRRTL to Verilog process instance subfield assignment
|
||||||
|
- Added "write_verilog -siminit"
|
||||||
|
- Several fixes and improvements for mem2reg memories
|
||||||
|
- Fixed handling of task output ports in clocked always blocks
|
||||||
|
- Improved handling of and-with-1 and or-with-0 in "opt_expr"
|
||||||
- Added "read_aiger" frontend
|
- Added "read_aiger" frontend
|
||||||
|
- Added "mutate" pass
|
||||||
|
- Added "hdlname" attribute
|
||||||
|
- Added "rename -output"
|
||||||
|
- Added "read_ilang -lib"
|
||||||
|
- Improved "proc" full_case detection and handling
|
||||||
|
- Added "whitebox" and "lib_whitebox" attributes
|
||||||
|
- Added "read_verilog -nowb", "flatten -wb" and "wbflip"
|
||||||
|
- Added Python bindings and support for Python plug-ins
|
||||||
|
- Added "pmux2shiftx"
|
||||||
|
- Added log_debug framework for reduced default verbosity
|
||||||
|
- Improved "opt_expr" and "opt_clean" handling of (partially) undriven and/or unused wires
|
||||||
|
- Added "peepopt" peephole optimisation pass using pmgen
|
||||||
|
- Added approximate support for SystemVerilog "var" keyword
|
||||||
|
- Added parsing of "specify" blocks into $specrule and $specify[23]
|
||||||
|
- Added support for attributes on parameters and localparams
|
||||||
|
- Added support for parsing attributes on port connections
|
||||||
|
- Added "wreduce -keepdc"
|
||||||
|
- Added support for optimising $dffe and $_DFFE_* cells in "opt_rmdff"
|
||||||
|
- Added Verilog wand/wor wire type support
|
||||||
|
- Added support for elaboration system tasks
|
||||||
- Added "muxcover -mux{4,8,16}=<cost>"
|
- Added "muxcover -mux{4,8,16}=<cost>"
|
||||||
- Added "muxcover -dmux=<cost>"
|
- Added "muxcover -dmux=<cost>"
|
||||||
- Added "muxcover -nopartial"
|
- Added "muxcover -nopartial"
|
||||||
- Added "muxpack" pass
|
- Added "muxpack" pass
|
||||||
- Added "pmux2shiftx -norange"
|
- Added "pmux2shiftx -norange"
|
||||||
|
- Added support for "~" in filename parsing
|
||||||
|
- Added "read_verilog -pwires" feature to turn parameters into wires
|
||||||
|
- Fixed sign extension of unsized constants with 'bx and 'bz MSB
|
||||||
|
- Fixed genvar to be a signed type
|
||||||
|
- Added support for attributes on case rules
|
||||||
|
- Added "upto" and "offset" to JSON frontend and backend
|
||||||
|
- Several liberty file parser improvements
|
||||||
|
- Fixed handling of more complex BRAM patterns
|
||||||
|
- Add "write_aiger -I -O -B"
|
||||||
|
|
||||||
|
* Formal Verification
|
||||||
|
- Added $changed support to read_verilog
|
||||||
|
- Added "read_verilog -noassert -noassume -assert-assumes"
|
||||||
|
- Added btor ops for $mul, $div, $mod and $concat
|
||||||
|
- Added yosys-smtbmc support for btor witnesses
|
||||||
|
- Added "supercover" pass
|
||||||
|
- Fixed $global_clock handling vs autowire
|
||||||
|
- Added $dffsr support to "async2sync"
|
||||||
|
- Added "fmcombine" pass
|
||||||
|
- Added memory init support in "write_btor"
|
||||||
|
- Added "cutpoint" pass
|
||||||
|
- Changed "ne" to "neq" in btor2 output
|
||||||
|
- Added support for SVA "final" keyword
|
||||||
|
- Added "fmcombine -initeq -anyeq"
|
||||||
|
- Added timescale and generated-by header to yosys-smtbmc vcd output
|
||||||
|
- Improved BTOR2 handling of undriven wires
|
||||||
|
|
||||||
|
* Verific support
|
||||||
|
- Enabled Verific flags vhdl_support_variable_slice and veri_elaborate_top_level_modules_having_interface_ports
|
||||||
|
- Improved support for asymmetric memories
|
||||||
|
- Added "verific -chparam"
|
||||||
|
- Fixed "verific -extnets" for more complex situations
|
||||||
|
- Added "read -verific" and "read -noverific"
|
||||||
|
- Added "hierarchy -chparam"
|
||||||
|
|
||||||
|
* New back-ends
|
||||||
|
- Added initial Anlogic support
|
||||||
|
- Added initial SmartFusion2 and IGLOO2 support
|
||||||
|
|
||||||
|
* ECP5 support
|
||||||
|
- Added "synth_ecp5 -nowidelut"
|
||||||
|
- Added BRAM inference support to "synth_ecp5"
|
||||||
|
- Added support for transforming Diamond IO and flipflop primitives
|
||||||
|
|
||||||
|
* iCE40 support
|
||||||
|
- Added "ice40_unlut" pass
|
||||||
|
- Added "synth_ice40 -relut"
|
||||||
|
- Added "synth_ice40 -noabc"
|
||||||
|
- Added "synth_ice40 -dffe_min_ce_use"
|
||||||
|
- Added DSP inference support using pmgen
|
||||||
|
- Added support for initialising BRAM primitives from a file
|
||||||
|
- Added iCE40 Ultra RGB LED driver cells
|
||||||
|
|
||||||
|
* Xilinx support
|
||||||
|
- Use "write_edif -pvector bra" for Xilinx EDIF files
|
||||||
|
- Fixes for VPR place and route support with "synth_xilinx"
|
||||||
|
- Added more cell simulation models
|
||||||
|
- Added "synth_xilinx -family"
|
||||||
|
- Added "stat -tech xilinx" to estimate logic cell usage
|
||||||
- Added "synth_xilinx -nocarry"
|
- Added "synth_xilinx -nocarry"
|
||||||
- Added "synth_xilinx -nowidelut"
|
- Added "synth_xilinx -nowidelut"
|
||||||
- Added "synth_ecp5 -nowidelut"
|
|
||||||
- "synth_xilinx" to now infer hard shift registers (-nosrl to disable)
|
- "synth_xilinx" to now infer hard shift registers (-nosrl to disable)
|
||||||
- Fixed sign extension of unsized constants with 'bx and 'bz MSB
|
- Added support for mapping RAM32X1D
|
||||||
|
|
||||||
|
|
||||||
Yosys 0.7 .. Yosys 0.8
|
Yosys 0.7 .. Yosys 0.8
|
||||||
----------------------
|
----------------------
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -115,7 +115,7 @@ LDFLAGS += -rdynamic
|
||||||
LDLIBS += -lrt
|
LDLIBS += -lrt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
YOSYS_VER := 0.8+$(shell cd $(YOSYS_SRC) && test -e .git && { git log --author=clifford@clifford.at --oneline 4d4665b.. 2> /dev/null | wc -l; })
|
YOSYS_VER := 0.9+1
|
||||||
GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN)
|
GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN)
|
||||||
OBJS = kernel/version_$(GIT_REV).o
|
OBJS = kernel/version_$(GIT_REV).o
|
||||||
|
|
||||||
|
|
|
@ -508,23 +508,17 @@ class TupleTranslator(PythonDictTranslator):
|
||||||
#Generate c++ code to translate to a boost::python::tuple
|
#Generate c++ code to translate to a boost::python::tuple
|
||||||
@classmethod
|
@classmethod
|
||||||
def translate_cpp(c, varname, types, prefix, ref):
|
def translate_cpp(c, varname, types, prefix, ref):
|
||||||
text = prefix + TupleTranslator.typename + " " + varname + "___tmp = boost::python::make_tuple(" + varname + ".first, " + varname + ".second);"
|
# if the tuple is a pair of SigSpecs (aka SigSig), then we need
|
||||||
return text
|
# to call get_py_obj() on each item in the tuple
|
||||||
tmp_name = "tmp_" + str(Translator.tmp_cntr)
|
if types[0].name in classnames:
|
||||||
Translator.tmp_cntr = Translator.tmp_cntr + 1
|
first_var = types[0].name + "::get_py_obj(" + varname + ".first)"
|
||||||
if ref:
|
|
||||||
text += prefix + "for(auto " + tmp_name + " : *" + varname + ")"
|
|
||||||
else:
|
else:
|
||||||
text += prefix + "for(auto " + tmp_name + " : " + varname + ")"
|
first_var = varname + ".first"
|
||||||
text += prefix + "{"
|
if types[1].name in classnames:
|
||||||
if types[0].name.split(" ")[-1] in primitive_types or types[0].name in enum_names:
|
second_var = types[1].name + "::get_py_obj(" + varname + ".second)"
|
||||||
text += prefix + "\t" + varname + "___tmp.append(" + tmp_name + ");"
|
else:
|
||||||
elif types[0].name in known_containers:
|
second_var = varname + ".second"
|
||||||
text += known_containers[types[0].name].translate_cpp(tmp_name, types[0].cont.args, prefix + "\t", types[1].attr_type == attr_types.star)
|
text = prefix + TupleTranslator.typename + " " + varname + "___tmp = boost::python::make_tuple(" + first_var + ", " + second_var + ");"
|
||||||
text += prefix + "\t" + varname + "___tmp.append(" + types[0].name + "::get_py_obj(" + tmp_name + "___tmp);"
|
|
||||||
elif types[0].name in classnames:
|
|
||||||
text += prefix + "\t" + varname + "___tmp.append(" + types[0].name + "::get_py_obj(" + tmp_name + "));"
|
|
||||||
text += prefix + "}"
|
|
||||||
return text
|
return text
|
||||||
|
|
||||||
#Associate the Translators with their c++ type
|
#Associate the Translators with their c++ type
|
||||||
|
|
|
@ -105,6 +105,7 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
|
|
||||||
std::string top_opt, edif_file, blif_file, family;
|
std::string top_opt, edif_file, blif_file, family;
|
||||||
bool flatten, retime, vpr, nobram, nolutram, nosrl, nocarry, nowidelut, abc9;
|
bool flatten, retime, vpr, nobram, nolutram, nosrl, nocarry, nowidelut, abc9;
|
||||||
|
bool flatten_before_abc;
|
||||||
int widemux;
|
int widemux;
|
||||||
|
|
||||||
void clear_flags() YS_OVERRIDE
|
void clear_flags() YS_OVERRIDE
|
||||||
|
@ -123,6 +124,7 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
nocarry = false;
|
nocarry = false;
|
||||||
nowidelut = false;
|
nowidelut = false;
|
||||||
abc9 = false;
|
abc9 = false;
|
||||||
|
flatten_before_abc = false;
|
||||||
widemux = 0;
|
widemux = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +164,10 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
flatten = true;
|
flatten = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-flatten_before_abc") {
|
||||||
|
flatten_before_abc = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (args[argidx] == "-retime") {
|
if (args[argidx] == "-retime") {
|
||||||
retime = true;
|
retime = true;
|
||||||
continue;
|
continue;
|
||||||
|
@ -387,6 +393,8 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
|
|
||||||
if (check_label("map_luts")) {
|
if (check_label("map_luts")) {
|
||||||
run("opt_expr -mux_undef");
|
run("opt_expr -mux_undef");
|
||||||
|
if (flatten_before_abc)
|
||||||
|
run("flatten");
|
||||||
if (help_mode)
|
if (help_mode)
|
||||||
run("abc -luts 2:2,3,6:5[,10,20] [-dff]", "(option for 'nowidelut', option for '-retime')");
|
run("abc -luts 2:2,3,6:5[,10,20] [-dff]", "(option for 'nowidelut', option for '-retime')");
|
||||||
else if (abc9) {
|
else if (abc9) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue