2023-12-17 18:19:01 -06:00
|
|
|
# ========================================================
|
|
|
|
# throw in some extra text to match what we expect if we were opening an
|
|
|
|
# interactive terminal
|
|
|
|
log $ yosys fifo.v
|
|
|
|
log
|
|
|
|
log -- Parsing `fifo.v' using frontend ` -vlog2k' --
|
|
|
|
read_verilog -defer fifo.v
|
|
|
|
|
|
|
|
# turn command echoes on to use the log output as a console session
|
|
|
|
echo on
|
|
|
|
hierarchy -top addr_gen
|
2024-01-17 20:33:59 -06:00
|
|
|
select -module addr_gen
|
|
|
|
select -list
|
|
|
|
select t:*
|
|
|
|
select -list
|
|
|
|
select -set new_cells %
|
|
|
|
select -clear
|
2024-01-21 16:10:02 -06:00
|
|
|
show -format dot -prefix addr_gen_show addr_gen
|
|
|
|
show -format dot -prefix new_cells_show -notitle @new_cells
|
2024-01-15 18:23:04 -06:00
|
|
|
show -color maroon3 @new_cells -color cornflowerblue p:* -notitle -format dot -prefix addr_gen_hier
|
2023-12-17 18:19:01 -06:00
|
|
|
|
|
|
|
# ========================================================
|
2024-01-15 18:23:04 -06:00
|
|
|
proc -noopt
|
2023-12-17 22:49:15 -06:00
|
|
|
select -set new_cells t:$mux t:*dff
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix addr_gen_proc
|
|
|
|
|
|
|
|
# ========================================================
|
2024-01-15 18:23:04 -06:00
|
|
|
opt_expr; clean
|
|
|
|
select -set new_cells t:$eq
|
|
|
|
show -color cornflowerblue @new_cells -notitle -format dot -prefix addr_gen_clean
|
2023-12-17 18:19:01 -06:00
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
design -reset
|
|
|
|
read_verilog fifo.v
|
|
|
|
hierarchy -check -top fifo
|
|
|
|
proc
|
2024-01-02 16:47:33 -06:00
|
|
|
select -set new_cells t:$memrd
|
|
|
|
show -color maroon3 c:fifo_reader -color cornflowerblue @new_cells -notitle -format dot -prefix rdata_proc o:rdata %ci*
|
2023-12-17 18:19:01 -06:00
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
2023-12-17 22:49:15 -06:00
|
|
|
flatten;;
|
2024-01-02 16:47:33 -06:00
|
|
|
select -set rdata_path o:rdata %ci*
|
|
|
|
select -set new_cells @rdata_path o:rdata %ci3 %d i:* %d
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_flat @rdata_path
|
2023-12-17 18:19:01 -06:00
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
2023-12-17 22:49:15 -06:00
|
|
|
opt_dff
|
|
|
|
select -set new_cells t:$adffe
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_adffe o:rdata %ci*
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
2024-01-03 17:49:48 -06:00
|
|
|
wreduce
|
2024-03-04 10:44:40 -06:00
|
|
|
show -notitle -format dot -prefix rdata_wreduce o:rdata %ci*
|
2024-01-03 17:49:48 -06:00
|
|
|
|
|
|
|
# unclear if this is necessary or only because of bug(s)
|
|
|
|
opt_clean
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
2023-12-17 22:49:15 -06:00
|
|
|
memory_dff
|
|
|
|
select -set new_cells t:$memrd_v2
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_memrdv2 o:rdata %ci*
|
|
|
|
|
|
|
|
# ========================================================
|
|
|
|
|
|
|
|
alumacc
|
|
|
|
select -set new_cells t:$alu t:$macc
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_alumacc o:rdata %ci*
|
|
|
|
|
|
|
|
# ========================================================
|
2023-12-17 18:19:01 -06:00
|
|
|
|
2024-01-07 21:59:03 -06:00
|
|
|
memory_collect
|
2024-01-03 17:49:48 -06:00
|
|
|
# or use the following commands:
|
|
|
|
# design -reset
|
|
|
|
# read_verilog fifo.v
|
|
|
|
# synth_ice40 -top fifo -run begin:map_ram
|
2023-12-17 22:49:15 -06:00
|
|
|
select -set new_cells t:$mem_v2
|
2023-12-19 19:08:06 -06:00
|
|
|
select -set rdata_path @new_cells %ci*:-$mem_v2[WR_DATA,WR_ADDR,WR_EN] @new_cells %co* %%
|
|
|
|
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_coarse @rdata_path
|