Commit graph

876 commits

Author SHA1 Message Date
Robert Ghilduta
bcf1f4b888 hdl: build A5s as part of build all hosteds 2025-05-11 04:17:01 -07:00
ifrasch17
b137fbdf91 hdl: updated readme with latest information
-removed stale information
-current quartus version to use is 20.1.1
-updated to include info about bladeRF 2 micro in addition to bladeRF 1
2025-04-24 04:36:36 -07:00
Ryan Thompson
2afc653557 hdl: dynamically set Nios data and instruction base address by ram size 2025-04-24 04:36:36 -07:00
Ryan Thompson
309e5e0266 hdl: fixed corrupted uart buffer with two writes before a read
When in the WAIT_FOR_READ state, the first character in reg_request
continuously is overwritten.
2025-04-24 04:36:36 -07:00
ifrasch17
23de23e55f hdl: Added missing signals to bladeRF2 nios_system model 2025-04-24 04:36:35 -07:00
ifrasch17
4bad3ab2ef hdl: fix delayed samples bug in bladeRF1
-adjusted transition from META_DOWNCOUNT to META_LOAD in attempt to fix delayed
 samples bug in bladeRF1
-Sample FIFO was missing the last read of each block
-Saw that meta_current.meta_time.go needed to be held for 1 extra clock cycle
-adjusted things so the transition only happens when dma_downcount==2 AND
 fifo_read=1
2025-04-24 04:36:35 -07:00
ifrasch17
ea07dad7dc hdl: fix bladeRF1 simulation
added missing files to compile.do, and added missing ports to nios_system.vhd,
 so that compile.do would compile and run without errors
2025-04-24 04:36:35 -07:00
Ryan Thompson
92b14af787 nios: added elf-gdb and gdb-server to the make args wrapping nios cmds 2025-04-24 04:36:35 -07:00
Ryan Thompson
fc0be5f7fb nios: rm --go from nios elf load
--go does not let the Nios core continue as one would assume. Now a gdb
client can connect and continue without issues.
2025-04-24 04:36:35 -07:00
Ryan Thompson
bd5d06879b build_bladerf: added parallel build for hosted 40, 115, A4, A9 FPGAs
usage:
./build_bladerf.sh -H
2025-04-09 23:17:40 -07:00
Ryan Thompson
cc6f329bb8 hdl: refactor RX/TX DMA request prioritization
* fixed TX deadlock when RX requests are not executed
* simplified RX and TX request prioritization
2025-04-09 23:17:40 -07:00
Ryan Thompson
f788085819 hdl: fixed tx sample fifo reset false path assigns for x40 & x115 builds 2025-04-09 23:17:40 -07:00
Ryan Thompson
730094891d hdl: fixed TX meta sample gap every gpif len when timestamp is META NOW 2025-04-09 23:17:40 -07:00
Ryan Thompson
3614c2ccc5 hdl: fixed late exit from TX meta down count state
The expected two cycle passing between meta write and idle states is
independent of the number of streams. Specifically addresses an
off-by-one timestamp error with the bladeRF 1.0.
2025-04-09 23:17:40 -07:00
Ryan Thompson
3a11ac3b39 hdl: fix fifo reader meta_p_time conditional violation
The conditional that moves the meta state to META_DOWNCOUNT contains a
max value check using the `val+1=0` idiom. We can remove the carry
propagation delay by comparing against a max value constant
assigned (others => '1'). The fixes a setup time violation.
2025-04-09 23:17:40 -07:00
Ryan Thompson
9db41c9faf hdl: optimized sc16q11 packed cycle calculation
Alleviates timing violations from resources allocated by the calibration
signal IP.
2025-04-09 23:17:40 -07:00
Ryan Thompson
950189d29d hdl: fix fifo_reader packet mode dma_downcount off-by-one error 2025-04-09 23:17:40 -07:00
Ryan Thompson
d48f0d568f hdl: added sc16q11 packed tx support 2025-04-09 23:17:40 -07:00
Ryan Thompson
36dddacd27 hdl: added sc16q11 packed format to fx3 model
Every 3 gpif cycles will contain 4 sc12q11 samples when the
packed format is enabled.
2025-04-09 23:17:40 -07:00
Ryan Thompson
057964225f hdl: added sc16q11 packed tx sample drop check 2025-04-09 23:17:40 -07:00
Ryan Thompson
999f632f8c hdl: fixed sc16q11 packed discontinuity on RX overflow
The 12b write cycle and buffer are held constant when in the HOLDOFF
state.
2025-04-09 23:17:40 -07:00
Ryan Thompson
9a22cd26d5 hdl: added sc16q11 packed enable signal from Nios GPIO 2025-04-09 23:17:40 -07:00
Ryan Thompson
6196c71911 hdl: added sc16q11 packed tb 2025-04-09 23:17:40 -07:00
Ryan Thompson
b52f50c1fe hdl: added highly packed mode to fifo writer
Iteratively packs 12b'samples across 3 fifo writes. The meta downcount
operation still needs to be confirmed.
2025-04-09 23:17:40 -07:00
Ryan Thompson
966900a8c1 hdl: added enable signal for highly packed mode 2025-04-09 23:17:40 -07:00
Ryan Thompson
bdd4f39a3d fx3_firmware: rev libbladeRF, hdl, and fx3 for 2048 sample gpif buffers
FX3 GPIF buffers set to 2048 samples and number of buffers reduced to
11 per dma channel. This substantially increases the theoretical USB
SuperSpeed throughput from roughly 228MB/s to 356MB/s.

$ make test_libbladeRF
[       OK ] libbladeRF.scheduled_retune (19755 ms)
[----------] 29 tests from libbladeRF (308802 ms total)

[----------] Global test environment tear-down
[==========] 29 tests from 1 test suite ran. (308802 ms total)
[  PASSED  ] 29 tests.
2025-04-09 23:17:40 -07:00
Ryan Thompson
87e06388d4 hdl: revert jtag timing fixes
SignalTap may throw a "jtag instance not found" error which is sourced
from not meeting timing requirements for the jtag interface. Reverting
previous fixes may resurface some timing issues, but the "instance not
found" error at least goes away and I can use signal tap again.

Sources:
SignalTap-II -> "instance not found" error
https://community.intel.com/t5/Programmable-Devices/SignalTap-II-gt-quot-instance-not-found-quot-error/m-p/238886

How to set timing constraint for JTAG
https://community.intel.com/t5/Programmable-Devices/How-to-set-timing-constraint-for-JTAG/m-p/1379278
2025-04-09 23:17:40 -07:00
Ryan Thompson
05ede8f541 fx3_firmware: increase DMA buffer sizes for USB throughput bottleneck
$ make test_hdl
[----------] Global test environment tear-down
[==========] 63 tests from 2 test suites ran. (381209 ms total)
[  PASSED  ] 63 tests.
[100%] Built target test_hdl
2025-04-09 23:17:40 -07:00
Ryan Thompson
2aaa5e2961 hdl: test: added variable gpif buffer length support for 8b testbenches 2025-04-09 23:17:40 -07:00
Ryan Thompson
5d7ff6a0ea hdl: test: added variable gpif buffer length support for gpif meta tb 2025-04-09 23:17:40 -07:00
Ryan Thompson
37d3e0b2e5 hdl: test: added variable gpif buffer length support for fx3_gpif_iq_tb 2025-04-09 23:17:40 -07:00
Ryan Thompson
6a0de33642 hdl: test: variable gpif buf length support added to testbenches 2025-04-09 23:17:40 -07:00
Ryan Thompson
89caa01c12 hdl: test: added variable length gpif support to fx3_model 2025-04-09 23:17:40 -07:00
Ryan Thompson
27fe2f48ea hdl: moved gpif buf size constants to fx3 gpif package
As we add changes to the FX3, it will be much easier to have a single
source of truth for the GPIF DMA sizes. This commit should not introduce
any changes to simulation or synthesis results.
2025-04-09 23:17:40 -07:00
Ryan Thompson
77d234c3bb hdl: leverage full sample depth of sample fifos
We were limiting ourselves to half of the fifo depth and subtracting
4 gpif buffers from that, which is 1/4 of the current fifo depth. No
sign of a full fifo during siso, mimo, meta, and non-meta streaming
tests at low sample rates. The fifo writes are appropriately held off.
2025-04-09 23:17:40 -07:00
Ryan Thompson
367df45e75 hdl: fixed fifo ingestion arithmetic on tx enable toggle
The channel shift would be left at 1 after the state moved to
COMPUTE_ENABLED_CHANNELS. Samples left would be reassigned to 1 in
COMPUTE_OFFSETS. Then channel offset would be assigned 2, an invalid
value.

This change only assigns samples left and channel shift if at the 0th
sample index, which allows for sample continuity.
2025-04-09 23:17:40 -07:00
Ryan Thompson
f230c9dc8d hdl: test: added gpif fifo stress test testbench
This copies the gpif 8b testbench, but with 7 blocks per TX iteration
and 2 subsequent iteration repeats. Run for 4ms to find channel shift
reset failure.
2025-04-09 23:17:40 -07:00
Ryan Thompson
ffd7f52a40 hdl: added git information to build output 2025-04-09 23:17:40 -07:00
Ryan Thompson
3cc8e3c54e hdl: fixed late exit from meta down count state
The expected two cycle passing between meta write and idle states is
independent of the number of streams. Specifically addresses an
off-by-one timestamp error with the bladeRF 1.0.
2025-04-09 23:17:40 -07:00
Ryan Thompson
179fe7c600 hdl: corrected bladeRF 1.0 FPGA version number 2025-01-06 13:36:48 -06:00
Semnodime
fe3304d759 hdl: fix readme typo
close #970
2024-08-13 14:56:15 -05:00
Ryan Thompson
03ccc0028a hdl: nios: debug print on failed pkt_8x32 r/w 2024-08-06 17:27:32 -05:00
Ben Morse
ffe66c5dfa host: update Eclipse instructions for NIOS software development on modern Quartus 20.1 2024-08-02 15:25:59 -05:00
Ryan Thompson
24babc361e hdl: add clock control blocks for system and fx3 plls
Resolves Nios and FX3 lockup when SI53304 clock select assignments are
made. The FX3 pclk and Nios system PLLs lose lock when the SI53304
transitions between clock sources and this prevents invalid cycles from
making it through.
2024-08-02 15:25:59 -05:00
Ryan Thompson
fd5dde022f hdl: nios: add response delay if new clock is selected 2024-08-02 15:25:59 -05:00
Ryan Thompson
fcb33420a0 hdl: fix first sample drop in fifo_writer
This fixes the first sample being dropped in both meta and non-meta modes.
fifo_write is now asserted through procedure and executes on HOLDOFF exit.

Regression test results:

$ make test_libbladeRF
[       OK ] libbladeRF.scheduled_retune (19450 ms)
[----------] 29 tests from libbladeRF (297804 ms total)
[==========] 29 tests from 1 test suite ran. (297804 ms total)
[  PASSED  ] 29 tests.

$ make test_hdl
[----------] 31 tests from hdl (1354828 ms total)
[----------] 32 tests from hdl/verify (2319711 ms total)
[==========] 63 tests from 2 test suites ran. (3674539 ms total)
[  PASSED  ] 63 tests.
2024-08-02 15:25:59 -05:00
Ryan Thompson
58727ab7a1 hdl: init meta_fifo_empty to 1
[==========] 32 tests from 1 test suite ran. (1785986 ms total)
[  PASSED  ] 20 tests.
[  FAILED  ] 12 tests, listed below:
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b01, where GetParam() = (false, false, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b10, where GetParam() = (false, true, false)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b11, where GetParam() = (false, true, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b01, where GetParam() = (true, false, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b10, where GetParam() = (true, true, false)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b11, where GetParam() = (true, true, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b01, where GetParam() = (false, false, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b10, where GetParam() = (false, true, false)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b11, where GetParam() = (false, true, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b01, where GetParam() = (true, false, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b10, where GetParam() = (true, true, false)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b11, where GetParam() = (true, true, true)

12 FAILED TESTS
2024-08-02 15:25:59 -05:00
Robert Ghilduta
cefdb2887c hdl: fixup more timing issues 2024-08-02 15:25:59 -05:00
Robert Ghilduta
4b62a41797 hdl: bladeRF-micro redefine JTAG SDC 2024-04-15 00:21:31 -07:00
Robert Ghilduta
473f5f0865 hdl: add false path for timing closure of common_dcfifo
Note: common_dcfifo impacts all bladeRF FIFOs, including sample and meta FIFOs.
2024-04-14 23:18:47 -07:00