Commit graph

600 commits

Author SHA1 Message Date
Rey Tucker
dc83ca473f hdl: build: add -S option to specify fitter seed
Optional argument to set the seed for a build.
2018-10-26 20:10:17 -04:00
Rey Tucker
a0f89f40ad hdl: fpga_v0.9.0 2018-10-26 16:38:41 -04:00
Rey Tucker
cb5dd4e954 hdl: bladerf-micro: weak pull-up on fx3_uart_rxd (#679)
Add a weak pull-up on fx3_uart_rxd

This is a bus used for both FPGA-to-FX3 UART data and FX3-to-Flash
SPI data, and without something driving it, it tends to float around
0.55 volts (which is very much a low/asserted signal for the UART).

When the FX3 SPI interface has the bus, it puts the FPGA into reset
via fx3_ctl(7), and fx3_uart_rxd goes high-Z accordingly.

I suspect what we're running into is a race condition between the FX3
reconfiguring the pin to UART mode and bringing the FPGA out of reset,
and the FPGA shifting from high-Z to high/idle, given:

- All of the "junk bytes" seen so far have been all ones followed by
  all zeroes, e.g. 0xF0, 0xFC, etc
- Being low for 5 clocks and then going high is indistinguishable from
  a start bit followed by 0xF0 followed by a stop bit.

Thus, by maintaining a constant weak pull-up on this bus, we can
ensure it's a logic high when idle.

There are possible side effects when the bus is in its SPI MOSI role,
but I believe they are minor. The FX3 is not expecting a pull-up/down
on this signal, and this is a critical pin for flash access. But,
C5's R_pu is 25 kohms, which means sinking 1.4 mA to pull it low, and
the FX3's absolute maximum output current is 20 mA, so I think we are
good here.
2018-10-26 16:02:01 -04:00
Rey Tucker
9640eec3b9 hdl: bladerf-micro: add false path for pwr_status 2018-10-24 14:07:49 -04:00
Brian Glod
2ffc216499
hdl: nios: README.md
Clarify import "Existing projects into Workspace"
2018-10-24 13:58:52 -04:00
Robert Ghilduta
803768cd48 hdl: enable miniexp routing to fifo_writer 2018-10-20 20:56:41 -04:00
Robert Ghilduta
54baeb15e8 hdl: add new miniexp flags to fifo_write
fifo_writer encodes when miniexp1 and miniexp2 IO pins are asserted.
2018-10-20 20:56:41 -04:00
Robert Ghilduta
22bc0486e5 hdl: clean up metatdata flags field in GPIF
The 16 LSBs of the flag word are overwritten by the GPIF state machine. The
other half is under control by the fifo_writer. Care should be taken when
appropriating new bits.

Bit 1 now encodes no "underrun", and bit 0 continues to encode "underrun."
2018-10-20 20:56:41 -04:00
Robert Ghilduta
fd26dabf8b hdl: instantiate ADS-B core in bladerf-adsb revision
These are the only changes necessary to the top level design to instantiate the
ADS-B core.
2018-10-19 01:41:16 -04:00
Robert Ghilduta
cd83e18bac hdl: introduce adsb_fifo_t type to bladeRF-micro platform
adsb_fifo_t should be unified with rx_fifo_t when Quartus starts supporting
generic packages.
2018-10-19 01:41:16 -04:00
Robert Ghilduta
f8d0991041 hdl: copy adsbfifo to bladeRF-micro platform
There is a case to say that this file should not be duplicated and kept in
common/. However the platform common directory is more much more abstract pieces
of code.
2018-10-19 01:41:16 -04:00
Robert Ghilduta
31addf6173 hdl: initial ADSB revision for bladeRF-micro
bladerf-adsb.vhd is a direct copy of bladerf-hosted.vhd. rx-adsb.vhd is a direct
copy of rx.vhd. These files will be modified to instantiate and enable the ADS-B
core.
2018-10-19 01:41:13 -04:00
Robert Ghilduta
6f711fbf9b hdl: introduce and use adsb_fifo_t
adsb_fifo_t should be unified with rx_fifo_t when Quartus starts supporting
generic packages.
2018-10-19 01:41:07 -04:00
Robert Ghilduta
c7efc303af hdl: build changes to bladeRF platform w/ ADSB revision 2018-10-19 01:41:00 -04:00
Brian Glod
e2daa36467 hdl: build: Cygwin compatibility
The use of 'readlink' with 'quartus_sh' results in bogus paths when
inside a Cygwin environment. Use of 'readlink' was determined to be
unnecessary and was removed.
2018-09-25 17:00:48 -04:00
Rey Tucker
da4fe49d78 hdl: bladerf: remove unnecessary/incorrect false_paths
synchronizers are responsible for doing their own timing
constraints inline
2018-09-24 14:53:23 -04:00
Rey Tucker
961ea1b738 hdl: bladerf: hosted: fix clock crossings, add registers
synchronizes and/or registers:
	lms_rx_enable_qualified, into rx_clock
	xb_gpio_dir and dac_csx, into 80MHz
	fx3_uart_cts, into fx3_pclk_pll

Improves timing closure probability
2018-09-24 14:53:23 -04:00
Rey Tucker
80c68e1678 hdl: nuand/command_uart: add registers to improve timing
Improves the odds of timing closure by registering the
output signal (rs232_sout).
2018-09-24 14:53:23 -04:00
Rey Tucker
0f46ea6255 hdl: bladerf: constrain the unconstrained paths
This commit updates the timing constraints for the bladerf1 to
constrain a number of previously-unconstrained paths:

fx3_uart_cts
lms_sclk
exp_{spi_clock,spi_mosi,gpio[*],clock_in}
mini_exp{1,2}

It also fixes the false_path for the TX FIFO ACLRs.
2018-09-24 14:53:23 -04:00
Rey Tucker
d9626a800c hdl: bladerf/sdc: set output delay on lms_sclk 2018-09-24 13:16:55 -04:00
Rey Tucker
45ea387f08 hdl: lms6002d/agc_lms_drv: register gain change requests
Improve timing margin by registering the gain change requests.
2018-09-24 13:16:55 -04:00
Rey Tucker
c00cf9669c hdl/bladerf1: move U_agc_lms to 80 MHz clock domain
Move the bladerf_agc_lms_drv component into the 80 MHz clock domain.

This ensures that it has a consistent clock to work with, instead of the
variable rx_clock. This ensures the SPI clock will always be 20 MHz, and
that everything is passing between known clock domains.

Adds the requisite synchronizers, etc.
2018-09-24 13:16:55 -04:00
Rey Tucker
1bd6391902 hdl: bladerf1: fix typo in toggle_led1 2018-09-21 13:19:07 -04:00
Brian Glod
fd59540480 hdl: Update changelog, set version to v0.8.0 2018-09-06 12:01:22 -04:00
Brian Glod
5e808b843c bladeRF1: Fix nios_gpio assignment for AGC_EN
Fixes #607

The nios_gpio bit assignment for AGC_EN was already being used for
led(1). This commit also fixes a bug in the agc_band_sel signal
assignment introduced in 3b670ca.
2018-09-06 12:01:22 -04:00
Rey Tucker
c114f03ce6 hdl: update changelog, set version 0.7.3 2018-08-07 15:25:25 -04:00
Rey Tucker
4f634b79d2 hdl: bladerf-micro: latch data to ad9361 DAC
Latch the data heading to the DAC, so that it is valid when the AD9361
interface expects it.

This addresses a bug in single-channel TX mode where samples would get
rearranged under some circumstances.
2018-05-22 13:00:21 -04:00
Rey Tucker
0ecf2e1165
hdl: bladeRF-micro: pin-out changes for preprod rev 1.1 (#19)
* hdl: bladeRF-micro: adjust pin layout for rev1.1 hw

Update the pinouts for adi_{rx,tx}_spdt{1,2}_v{1,2} to reflect move from
bank 5A to banks 5B/4A

Move INA219 I2C pins to bank 5A

Move ADP2384 sync pins to bank 7A

Move ADF4002 control pins to bank 5A

* hdl: bladeRF-micro: move {rx,tx}_bias_en from bank 7A to 5A

rx_bias_en moves from J11 to R22
tx_bias_en moves from A13 to R21

* hdl: bladeRF-micro: move mini_exp{1,2}, rm c5_clock1

In Bank 7A,
c5_clock1 is deleted from H16
mini_exp1 moves from J18 to H16
mini_exp2 moves from J17 to H15

* hdl: bladeRF-micro: remove refs to c5_clock1

* hdl: bladeRF-micro: set max toggle rate for SPDT switches

Fixes Critical Warning (12888) for high estimated crosstalk
on adi_rx_data[1] by adi_{rx,tx}_spdt{1,2}_v[{1,2}]
2018-04-03 18:15:48 -04:00
Rey Tucker
7a1f577349 hdl: update changelog, set version 0.7.2 2018-03-26 15:22:56 -04:00
Rey Tucker
dd622a646d hdl: fx3_gpif: fix off-by-one in metafifo handling
As written, the overrun bits were clobbering the timestamp MSW.  This
should fix everything up.
2018-03-22 18:42:40 -04:00
Brian Glod
b6d8a415b2 hdl: bladeRF: Update suppressed messages
- Ignore tx_pilot being assigned but not read in atsc_tx.vhd
- Ignore warning 10542, using initial value expression for variable
2018-03-06 13:56:45 -05:00
Brian Glod
9f6c696442 hdl: bladeRF: Assign initial values to FIFO signals 2018-03-06 13:56:45 -05:00
Brian Glod
d9a237ca9c hdl: bladeRF: Clean up warnings atsc_tx 2018-03-06 13:56:45 -05:00
Brian Glod
4790d9261c hdl: bladeRF: Fix latches in DAC SPI process 2018-03-06 13:56:45 -05:00
Brian Glod
017b294a54 hdl: bladeRF-all: Change direction of Nios control PIO
Changed from "output" to "inout" to accept inputs. In this mode, the
GPIO has two independent buses, one for input, one for output. In order
to maintain previous behavior, which allowed the Nios to read the
current values being output, we must explicitly feed back the output bus
to the input bus.
2018-03-01 15:20:19 -05:00
Brian Glod
3b670ca799 hdl: bladeRF: nios_gpio_t, fifo_t, bladerf_p.vhd
Add bladerf_p.vhd package, which handles nios_gpio packing and unpacking
between bits and record elements. This consolidates bit-to-function
mapping, making it easier to modify the mapping in the future.

This package also defines the FIFO record types and the nios_system
component for easier re-use.
2018-03-01 15:20:19 -05:00
Brian Glod
a4681812ca ip: nuand/atsc_tx: Fix power-up/reset value mismatch 2018-02-22 15:57:32 -05:00
Brian Glod
9632450d40 hdl: build: Add build time output
Prints total time taken to build the FPGA image.
2018-02-16 18:45:48 -05:00
Brian Glod
37de987a36 hdl: build: Delete empty SOPC directories
Delete empty SOPC directories created by Quartus during IP core
generation. These empty directories are created in the user's home
directory and can accumulate if left unchecked. Use `find' with
approprate filters to (hopefully) avoid deleting anything important!
2018-02-16 13:29:23 -05:00
Brian Glod
c86fb65bff hdl: bladeRF-all: Rename lms_spi to rffe_spi
Quick change so that LMS references are not present in the bladeRF-micro
platform.
2018-02-14 18:14:07 -05:00
Brian Glod
3a71aee58a hdl: build: Add build flow support
Quartus supports different build flows. Adding support for that so that
a user can choose to simply generate the project files, run synthesis
only (e.g. to check syntax), or do the full place and route to generate
programming files.
2018-02-09 17:57:25 -05:00
Brian Glod
236a639021 hdl: build: Fix Quartus project revision parameter
The project revision option specified on the command line was not being
passed to the build Tcl file.

Changed handling of message suppression files. Filename should be the
same as the revision name. Instead of managing potentially several
identical or nearly identical .srf files, just manage the one and have
the build script rename it when copying it to the build directory.

Fixed references to the nios_system.qip file in bladerf-fsk_bridge.qip
and bladerf-qpsk_tx.qip.
2018-02-09 17:54:20 -05:00
Brian Glod
4faf3d172a hdl: build: Better checking for Quartus binaries
- Check for qsys-* binaries
- Check for nios2-* binaries

These binaries do not exist in the same directory as quartus_sh.
2018-02-09 17:42:06 -05:00
Brian Glod
3b5c432f0c hdl: build: getopts, help text
- Add "board" as a required option in help text
- The description of the SignalTap force option was vague.
- Added check for null argument.
- Do not print full usage information for an invalid option.
2018-02-09 17:37:38 -05:00
Brian Glod
8a162b337e hdl: build: Remove NiosII/s option
Beginning in Quartus 14.0, the NiosII processor split into two versions:
Classic and Gen 2. Development of new features for the Classic ceased in
Quartus 14.0. Nuand upgraded to the Gen 2 core for the release of the
bladeRF micro. The Gen 2 core does not have an option for the
Small (NiosII/s) implementation, so the option was removed from the
build script.

Nuand may add a NiosII/s approximation of the NiosII/f in the
future. This will happen quicker if we get requests to do so. :)
2018-02-09 13:01:27 -05:00
Brian Glod
a975f782e6 hdl: bladerf: Suppress fifo_reader null range warning
A null range in this function is expected for SISO platforms.
2018-02-07 20:04:16 -05:00
Brian Glod
c027a47697 hdl: ip/nuand: Fix edge detector reset value
Fixes presettable/clearable register to latch conversion warning 13004.
2018-02-07 20:02:55 -05:00
Brian Glod
0e74d15784 hdl: bladerf: Fix signal assignment warnings
Removed unused signals and fixed implicit defaults.
2018-02-07 19:37:56 -05:00
Brian Glod
b143190aae nios: Add agc_dc_corr_write() to devices.h
Add function declaration to devices.h
2018-02-07 18:16:45 -05:00
Brian Glod
3a5ec43b25 hdl: ip/nuand: Initialize sync output to RESET_LEVEL 2018-02-07 18:01:17 -05:00