mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-29 21:36:33 +00:00
Migrate build system to CMake
See #5895 for details. This commit does not include CI or documentation changes.
This commit is contained in:
parent
9d0cdb8551
commit
9b087b4aa7
207 changed files with 5202 additions and 2294 deletions
2
techlibs/gatemate/.gitignore
vendored
2
techlibs/gatemate/.gitignore
vendored
|
|
@ -1,4 +1,2 @@
|
|||
lut_tree_cells.genlib
|
||||
lut_tree_map.v
|
||||
lut_tree_lib.mk
|
||||
|
||||
|
|
|
|||
65
techlibs/gatemate/CMakeLists.txt
Normal file
65
techlibs/gatemate/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
yosys_pass(gatemate_foldinv
|
||||
gatemate_foldinv.cc
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
DEPENDS make_lut_tree_lib.py
|
||||
# yosys_pass(DATA_FILES) expects the files to be in the source directory
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/lut_tree_cells.genlib ${CMAKE_CURRENT_SOURCE_DIR}/lut_tree_map.v
|
||||
COMMAND ${Python3_EXECUTABLE} make_lut_tree_lib.py
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
yosys_pass(synth_gatemate
|
||||
synth_gatemate.cc
|
||||
REQUIRES
|
||||
abc
|
||||
alumacc
|
||||
blackbox
|
||||
check
|
||||
clean
|
||||
clkbufmap
|
||||
deminout
|
||||
dfflegalize
|
||||
flatten
|
||||
fsm
|
||||
gatemate_foldinv
|
||||
hierarchy
|
||||
iopadmap
|
||||
memory
|
||||
memory_libmap
|
||||
memory_map
|
||||
muxcover
|
||||
muxpack
|
||||
opt
|
||||
opt_clean
|
||||
opt_expr
|
||||
peepopt
|
||||
proc
|
||||
read_verilog
|
||||
share
|
||||
simplemap
|
||||
stat
|
||||
techmap
|
||||
tribuf
|
||||
wreduce
|
||||
write_json
|
||||
write_verilog
|
||||
DATA_DIR
|
||||
gatemate
|
||||
DATA_FILES
|
||||
reg_map.v
|
||||
mux_map.v
|
||||
lut_map.v
|
||||
mul_map.v
|
||||
arith_map.v
|
||||
cells_sim.v
|
||||
cells_bb.v
|
||||
brams_map.v
|
||||
brams.txt
|
||||
brams_init_20.vh
|
||||
brams_init_40.vh
|
||||
inv_map.v
|
||||
lut_tree_cells.genlib
|
||||
lut_tree_map.v
|
||||
)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
OBJS += techlibs/gatemate/synth_gatemate.o
|
||||
OBJS += techlibs/gatemate/gatemate_foldinv.o
|
||||
|
||||
GENFILES += techlibs/gatemate/lut_tree_cells.genlib
|
||||
GENFILES += techlibs/gatemate/lut_tree_map.v
|
||||
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/reg_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/mux_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/lut_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/mul_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/arith_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/cells_sim.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/cells_bb.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/brams_map.v))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/brams.txt))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/brams_init_20.vh))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/brams_init_40.vh))
|
||||
$(eval $(call add_share_file,share/gatemate,techlibs/gatemate/inv_map.v))
|
||||
|
||||
EXTRA_OBJS += techlibs/gatemate/lut_tree_lib.mk
|
||||
.SECONDARY: techlibs/gatemate/lut_tree_lib.mk
|
||||
|
||||
techlibs/gatemate/lut_tree_lib.mk: techlibs/gatemate/make_lut_tree_lib.py
|
||||
$(Q) mkdir -p techlibs/gatemate
|
||||
$(P) $(PYTHON_EXECUTABLE) $<
|
||||
$(Q) touch $@
|
||||
|
||||
techlibs/gatemate/lut_tree_cells.genlib: techlibs/gatemate/lut_tree_lib.mk
|
||||
techlibs/gatemate/lut_tree_map.v: techlibs/gatemate/lut_tree_lib.mk
|
||||
|
||||
$(eval $(call add_gen_share_file,share/gatemate,techlibs/gatemate/lut_tree_cells.genlib))
|
||||
$(eval $(call add_gen_share_file,share/gatemate,techlibs/gatemate/lut_tree_map.v))
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ for name, expr in base_cells:
|
|||
if name not in ("$__CC4_XX", "$__CC3_X"):
|
||||
cells.append([name + "_X", 12, XOR(E, expr)])
|
||||
|
||||
with open("techlibs/gatemate/lut_tree_cells.genlib", "w") as glf:
|
||||
with open("lut_tree_cells.genlib", "w") as glf:
|
||||
def mkGate(name, cost, expr, max_load=9999, block_delay = 10, fanout_delay = 5):
|
||||
name = name.replace(" ", "")
|
||||
expr = expr.map()
|
||||
|
|
@ -280,7 +280,7 @@ lut_prims = {
|
|||
)
|
||||
}
|
||||
|
||||
with open("techlibs/gatemate/lut_tree_map.v", "w") as vf:
|
||||
with open("lut_tree_map.v", "w") as vf:
|
||||
# Non-automatic rules
|
||||
print("""
|
||||
module \\$__ZERO (output Y); assign Y = 1'b0; endmodule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue