From 93c92b9f554eb5f4a7ae88e45f402ebf8afbc295 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Mon, 20 Mar 2023 13:57:15 -0400 Subject: [PATCH] add test scripts for synthesizing ram fifo --- firmware/rtl/raster/flow.json | 24 ++++++++++++++++++++++++ firmware/rtl/raster/script | 4 ++++ firmware/rtl/raster/synth_test_top.v | 28 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 firmware/rtl/raster/flow.json create mode 100644 firmware/rtl/raster/script create mode 100644 firmware/rtl/raster/synth_test_top.v diff --git a/firmware/rtl/raster/flow.json b/firmware/rtl/raster/flow.json new file mode 100644 index 0000000..7034f6b --- /dev/null +++ b/firmware/rtl/raster/flow.json @@ -0,0 +1,24 @@ +{ + "default_part": "XC7A35TCSG324-1", + "values": { + "top": "top" + }, + "dependencies": { + "sources": [ + "synth_test_top.v", + "ram_fifo_dual_port.v", + "ram_fifo.v" + ], + "synth_log": "synth.log", + "pack_log": "pack.log" + }, + "XC7A35TCSG324-1": { + "default_target": "bitstream", + "dependencies": { + "build_dir": "build/arty_35", + "xdc": [ + "arty.xdc" + ] + } + } +} diff --git a/firmware/rtl/raster/script b/firmware/rtl/raster/script new file mode 100644 index 0000000..6714108 --- /dev/null +++ b/firmware/rtl/raster/script @@ -0,0 +1,4 @@ +read_verilog raster.v +synth_xilinx -flatten -nosrl -noclkbuf -nodsp -iopad -nowidelut +# synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -nowidelut +write_verilog synth_test_yosys.v diff --git a/firmware/rtl/raster/synth_test_top.v b/firmware/rtl/raster/synth_test_top.v new file mode 100644 index 0000000..0cf97f9 --- /dev/null +++ b/firmware/rtl/raster/synth_test_top.v @@ -0,0 +1,28 @@ +module top ( + input clk, + input [1:0] btn, + input ck_io0, + input ck_io1, + input ck_io2, + input ck_io3, + output ck_io4, + output ck_io5, + output ck_io6, + output ck_io7, +); + + wire bufg; + BUFG bufgctrl ( + .I(clk), + .O(bufg) + ); + + ram_fifo #(.DAT_WID(4), .FIFO_DEPTH(65535/2), .FIFO_DEPTH_WID(16) ) rf ( + .clk(bufg), + .rst(0), + .read_enable(btn[0]), + .write_enable(btn[1]), + .write_dat({ck_io0,ck_io1,ck_io2,ck_io3}), + .read_dat({ck_io4,ck_io5,ck_io6,ck_io7}) + ); +endmodule