Commit graph

68 commits

Author SHA1 Message Date
Robert Ghilduta
14aaebcc66 bladeRF-cli: clear up nomeclature in set samplerate 2023-02-28 04:43:00 -08:00
Robert Ghilduta
1ccfa4b41c launch_eclipse: update eclipse-nios2 step 2020-06-22 21:22:57 -04:00
Rey Tucker
28b5b6a718 build_bladerf: modify for foxhunt 2020-06-22 20:17:46 -04:00
Rey Tucker
2fa3bc4f83 build_bladerf.sh: pass platform revision through to nios build 2020-06-22 20:17:46 -04:00
Robert Ghilduta
13e62bb9c1 hdl: add launch_eclipse.sh as an Eclipse launch helper 2019-12-20 14:00:06 -08:00
Robert Ghilduta
d04076ab70 hdl: make build_bladerf compatible with Quartus 19
PERL5LIB is manually set for Quartus version equal to or greater than 19
2019-12-18 15:55:53 -08:00
Robert Ghilduta
718c487617 hdl: synthesize under Windows 2019-03-29 02:10:42 -07:00
Brian Glod
f761d6c9d6 hdl: nios: Get rid of common_system.tcl
The common_system.tcl was intended to be a common Qsys subsystem used by
bladeRF1 and bladeRF2. However, it needlessly complicated the Qsys
systems for both platforms.

This commit moves the contents of common_system.tcl into each platform's
own nios_system.tcl. The C code running on the Nios, however, remains
shared.
2019-01-08 17:41:30 -05:00
Brian Glod
7e6e3bd69f hdl/build_bladerf.sh: Fix SignalTap variable name
Fix erroneous variable name pointing to the SignalTap file to be used
when creating a Quartus project.
2018-12-12 16:56:04 -05:00
Rey Tucker
fd77d9f4a9 hdl: build: parameterize nios2 RAM size by platform/size
On xA4/xA9, we can have a larger memory footprint, and we need
it for libad936x, which is a hefty boi
2018-11-26 16:16:10 -05:00
Brian Glod
8cc9538629 hdl: build: Fix escaping for Windows
Escaping the double quotes worked on Linux, but not on whatever
abomination of Cygwin's bash. The work-around uses braces. This works
because Tcl interprets them as single quotes while bash ignores them,
allowing the substitution to happen.
2018-11-11 16:18:09 -05:00
Brian Glod
6220a09fc8 hdl: build: Add device and device family to Qsys scripts
Previously, the device and device family were just hard-coded in the
Qsys scripts. This wasn't a problem because the generated code/system is
compatible within a device family. However, this change makes things
more explicit to avoid confusion and perhaps take advantage of any
optimizations, warnings, or limitations that may be differ among devices
within a family.
2018-11-09 19:13:59 -05:00
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
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
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
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
0be88bb868 hdl: build: Fix adding FPGA size to work dir name
This commit should be squashed into:

4f9a59aafd
  "hdl/build: Fix clearing of work directory"
2018-02-07 17:02:36 -05:00
Brian Glod
4ac61d1a3f hdl/build: Add FPGA size to work directory name
Allows even more builds to occur simultaneously.
2018-01-26 20:07:40 -05:00
Brian Glod
4f9a59aafd hdl/build: Fix clearing of work directory
Don't wipe the entire work directory, only wipe the work/$platform
directory. This allows us to run builds of multiple platforms
simultaneously.
2018-01-26 17:47:04 -05:00
Brian Glod
51255913f4 hdl: Move message suppression files
To platform's build dir
2017-12-21 15:44:54 -05:00
Brian Glod
268259fed8 bladerf-micro: build: Add hosted message suppression file
Suppress some warnings that we have no control over. For example, some
nets within Quartus-generated HDL:

- avalon_merlin_width_adapter
- avalon_merlin_axi_slave_ni
- interconnect_2_router
- Altera's SPI controller
- Altera's LVDS controller
- etc...
2017-12-21 12:55:01 -05:00
Brian Glod
83bfd22f34 bladerf: Move SignalTap files into platform dir 2017-12-21 12:55:00 -05:00
Brian Glod
d48e59066f build: Change flow from 'none' to 'gen'
More accurate description of what the flow is. The 'gen' flow only
generates the Quartus projects and other dependencies. It does not
perform synthesis, fitting, etc. As a result 'gen' is a more appropriate
flow name than 'none'.
2017-12-21 12:54:57 -05:00
Brian Glod
46b0b26edf build: Fix force STP option 2017-12-21 12:54:55 -05:00
Brian Glod
4cebde5516 bladerf: build: Remove obsolete build script 2017-12-21 12:54:54 -05:00
Brian Glod
8994765595 bladerf: build: Port to new build script 2017-12-21 12:54:54 -05:00
Brian Glod
6bc6c23eef bladerf-micro: build: Delete obsolete build scripts 2017-12-21 12:21:15 -05:00
Brian Glod
4fa3acada4 bladerf-micro: build script overhaul
First pass, lots of changes. Untested.
2017-12-21 12:21:07 -05:00
Brian Glod
b9cff9f52e bladerf-micro: Initial commit
Will synthesize, but cannot fit due to some problem with adi_tx_clock.
2017-12-21 11:28:58 -05:00
Brian Padalino
65e764d4bb adsb: Adding FPGA based ADSB decoding.
This commit adds all the files required for using the FPGA on
the bladeRF as an ADSB message decoder.  The decoder uses a low
IF approach for decoding the PPM messages from ADSB.  The FPGA
processing expects a samplerate of 16 MHz and the IF to be at
4 MHz.  The FPGA will mix, filter and turn the result into a
power value.  This power value is then compared against a noise
floor, the preamble is searched and, if found, one of a number
of message decoders are used to decode the data.  If the CRC
does not pass, a bit flipping technique is used to flip the
lowest 5 soft decisions and re-try the CRC.  If successful,
the message is sent into a holding area and into a FIFO which
collects the ADSB messages.  After a timeout period, if messages
have not filled the FIFO, zeros are stuffed until the FIFO is
full enough for a DMA transfer to the host.

An example of a host application for receiving the ADSB messages
is located in the example directory.
2016-04-27 23:58:28 -07:00
Brian Glod
597435bcd5 hdl: Deleting obsolete files.
These files are not used. Constraints are located in the platform
directory.
2016-04-06 16:43:06 -04:00
Brian Glod
1f0e6f65e0 build: Fix SignalTap in scripted builds
Simply enabling SignalTap and specifying the .stp file in the project
settings is not sufficient for getting SignalTap into the build. The
.stp file must be translated into project assignments that get appended
to the .qsf file. This is done by calling 'quartus_stp' with the project
name, revision, the .stp file, and the parameter to enable SignalTap in
the project. Quartus_stp must run successfully before Analysis &
Synthesis.

Also added an exception to let non-Web Editions (e.g. Standard and Pro)
of the Quartus tools to add SignalTap files without enabling TalkBack.
2016-04-01 23:19:31 -04:00
Ryan Tucker
a82c85e48c hdl: check for null TALKBACK_ENABLED (#354)
This handles the case where TALKBACK_ENABLED has never been explicitly
set and is empty.
2016-01-24 17:10:26 -05:00
Brian Glod
56c6f9c080 hdl: Fixed tune reference MUX select inputs and
The tune reference MUX select inputs were connected to a version of the
tune mode signal synchronized to the tune_ref clock domain. This was an
oversight that would cause a 2-3 second delay after resetting the
counters when tuning against a 1PPS reference (because the synchronizer
block contains two flops clocked at 1 Hz). This was corrected and the
MUX now uses the system-synchronous tune_mode signal from the control
register in the Avalon-MM interface.

Renamed the tune_mode signals to include the clock domain (prefixed with
tune_ref_*).

Added ability for the Avalon-MM master to read back the control register
contents.

Updated tcxopps.stp SignalTap file with new signal names.
2015-12-14 15:29:59 -05:00
Brian Glod
16c0b854fc hdl: Updating VCTCXO Tamer SignalTap file to reflect current signal names 2015-12-14 15:29:59 -05:00
Brian Glod
67eeb00f97 hdl: Initial checkin of TCXO tuning via 1PPS 2015-12-14 15:29:58 -05:00
Jon Szymaniak
238d8b23be hdl: Added build option to select NIOS II core implementation 2015-08-25 13:28:05 -04:00
Brian Padalino
44f7b40ae8 quartus: Enable/Disable TalkBack.
Enable/Disable the TalkBack feature of Quartus based on SignalTap
insertion and if the user really wants to force the script to enable
and disable it at the end of building.

If TalkBack is disabled, and SignalTap is requested to be added to
the project, then the build will now fail instead of warn about
TalkBack not being enabled.
2015-08-20 15:01:05 -04:00
Jon Szymaniak
993b3e1fbb hdl: Check for Quartus 15 in build script
Provide clear and concise feedback early, rather than a long
set of unintuitive errors.
2015-06-29 20:45:27 -04:00
Jon Szymaniak
3bfae3ca67 nios: Redesign and rewrite of NIOS II code
The NIOS II code that handles requests/response from the host
(via the FX3 UART) has been redesigned and rewritten to improve
its readability and extensibility.

Many, many thanks go out to Cameron Karlsson for providing his NIOS II
code re-design and feedback, upon which this effort was based.
2015-06-18 18:32:55 -04:00
Jon Szymaniak
67c5782ef9 hdl: Removed outdated revisions from build script
These items have become out-of-date with the current design and
no longer build. As such, they have been removed to avoid confusion.

Issue #360 has been opened to track the updating of these. These
items shall be re-added as they are updated.
2014-12-12 15:50:55 -05:00
Jon Szymaniak
d7d93c173c hdl: Store build artifacts in a timestamped directory, with reports
FPGA build artifacts are now copied to a <rev>x<size>-<timestamp>
directory. The .rbf, SHA256 & MD5 checksums, and reports/summaries are
copied into this directory.

This is intended to help keep files with their associated FPGA images, as
items in work/ are clobbered with each invocation of build_bladerf.sh.
2014-10-23 13:02:31 -04:00
Jon Szymaniak
30aab0e684 hdl: Print MD5 & SHA256 checksums of FPGA images at the end of the build 2014-10-22 17:22:12 -04:00
modustollens
35e5a6ee06 hdl: Added ATSC TX FPGA implementation
This revision introduces an FPGA-based ATSC transmitter to offload the
pilot insertion, filtering, and shift to baseband.

This design expects that 4-bit ATSC symbols are written to the device in
little-endian 32-bit words, as shown below.

        |<-------                               32 Bit Word                                     ------->|
Bit     |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
Symbol  [ X|   7    ][X|  6     ][X|   5    ][X|    4   ][X|   3   ][X|   2     ][X|    1   ][X|    0   ]

The FPGA transmits Symbol 0 first, and Symbol 7 last. The three
least-significant bits in each symbol's nibble contain values 0 to 7,
mapping to values of -7 to 7, with the most-significant bit left unused.

This FPGA image may be built by specifying the "atsc_tx" image to the
build_bladerf.sh script. The resulting output files will be
atsc_txx40.rbf and atsc_txx115.rbf for the x40 and the x115,
respectively.

Transmitting a pre-made stream on channel 14-1 can be achieved with the
following commands in the bladeRF-cli:

    set frequency 473000000
    set samplerate 32286713 2867 10000

    set txvga1 -4
    set txvga2 20

    tx config file=<path to file> repeat=0 delay=0
    tx start
2014-10-17 18:24:54 -04:00
Brian Padalino
2ddb78e20f hdl: Adding fx3_pll for better clock control. 2014-07-10 22:10:22 -04:00