From 231b0504149ca445759f109e44c190ff149da4c8 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Mon, 13 Jan 2020 15:30:54 -0800 Subject: [PATCH] hdl: move fx3_gpif_tb to micro specific testbench --- hdl/fpga/ip/nuand/fx3_gpif_tb.do | 10 ---------- hdl/fpga/ip/nuand/nuand.do | 7 ++++++- .../platforms/bladerf-micro/modelsim/fx3_gpif_tb.do | 12 ++++++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 hdl/fpga/platforms/bladerf-micro/modelsim/fx3_gpif_tb.do diff --git a/hdl/fpga/ip/nuand/fx3_gpif_tb.do b/hdl/fpga/ip/nuand/fx3_gpif_tb.do index fbb3b2cb..1b3cc47b 100644 --- a/hdl/fpga/ip/nuand/fx3_gpif_tb.do +++ b/hdl/fpga/ip/nuand/fx3_gpif_tb.do @@ -22,13 +22,3 @@ proc waves_fx3_gpif { } { add wave -radix hexadecimal -expand -group gpif sim:/fx3_gpif_tb/U_fx3_gpif/* add wave -radix hexadecimal -expand -group model sim:/fx3_gpif_tb/U_fx3_model/* } - -if [info exists root] { - compile_fx3_gpif $root -} else { - # We assume we're in hdl/quartus/work/bladerf-micro/simulation/modelsim - compile_fx3_gpif [file join [pwd] .. .. .. .. .. fpga ip nuand] -} - -simulate_fx3_gpif -waves_fx3_gpif diff --git a/hdl/fpga/ip/nuand/nuand.do b/hdl/fpga/ip/nuand/nuand.do index 3f3624a0..01a7da2c 100644 --- a/hdl/fpga/ip/nuand/nuand.do +++ b/hdl/fpga/ip/nuand/nuand.do @@ -51,13 +51,18 @@ proc compile_nuand { root platform } { vcom -work nuand -2008 [file join $root ./synthesis/fifo_readwrite_p.vhd] vcom -work nuand -2008 [file join $root ./synthesis/fifo_reader.vhd] vcom -work nuand -2008 [file join $root ./synthesis/fifo_writer.vhd] - vcom -work nuand -2008 [file join $root ./simulation/sample_stream_tb.vhd] vcom -work nuand -2008 [file join $root ./trigger/trigger.vhd] vcom -work nuand -2008 [file join $root ./synthesis/signal_generator.vhd] + vcom -work nuand -2008 [file join $root ./synthesis/rx_packet_generator.vhd] + vcom -work nuand -2008 [file join $root ./synthesis/set_clear_ff.vhd] vcom -work nuand -2008 [file join $root ./pll_reset/vhdl/pll_reset.vhd] vcom -work nuand -2008 [file join $root ./ps_sync/vhdl/ps_sync.vhd] } + +proc compile_nuand_tb { root platform } { + vcom -work nuand -2008 [file join $root ./simulation/sample_stream_tb.vhd] +} diff --git a/hdl/fpga/platforms/bladerf-micro/modelsim/fx3_gpif_tb.do b/hdl/fpga/platforms/bladerf-micro/modelsim/fx3_gpif_tb.do new file mode 100644 index 00000000..79f5bb95 --- /dev/null +++ b/hdl/fpga/platforms/bladerf-micro/modelsim/fx3_gpif_tb.do @@ -0,0 +1,12 @@ +source ../../../ip/nuand/nuand.do + +vcom -work nuand -2008 ../vhdl/rx.vhd +vcom -work nuand -2008 ../vhdl/tx.vhd + +vlib rtl_work +vcom -work rtl_work -2008 ../../../ip/altera/fx3_pll/fx3_pll.vhd + +compile_nuand ../../../ip/nuand bladerf-micro + +vcom -work nuand -2008 ../vhdl/tb/fx3_model.vhd +vcom -work nuand -2008 ../vhdl/tb/fx3_gpif_tb.vhd