| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
| |
|
|
|
|
| |
consideration of the device type
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added files which were previously maintained in meta-ettus
repository but which are better placed alongside MPM itself:
- eth0/int0/sfp0/sfp1.network: network configuration files
- 70-sfp-net.rules: udev rule for automatically naming the
network interfaces
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
|
| |
|
| |
|
|
|
|
| |
Add an entry for the internal NIC to E320.
|
|
|
|
|
|
| |
This changes MTU handling for the "internal" UDP type. Because MPM
echo packets will not be returned for internal NICs, use the iface's
programmed MTU instead.
|
| |
|
|
|
|
|
| |
Instead of using hard-coded values, detect the number of liberio
channels, and only offer liberio links if they exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the c++ api, methods like chdr_packet#set_payload() and
chdr_packet#get_payload() are templated over the payload type
(payload_t). For methods like set_payload, they are overloaded by the
type of an argument, so in pybind we can just explicitly instaniate the
template for each payload_t and register it with pybind under the same
name. At runtime, pybind looks at the type of the argument and decides
which to call.
The problem arose with methods like get_payload, which are overloaded by
return type. In C++, the compiler can infer the template type by the
type of the target at the call site. In python, there is no way for the
pybind to determine which variant of get_payload to call, and it would
crash. Previously, the workaround for this was to declare
get_payload_ctrl, get_payload_mgmt, etc, but this was rather
anti-pythonic. This commit utilizes the fact that python methods don't
have a constrained return type to resolve this. Now, get_payload will
call a python method which looks at the chdr_packet#header#pkt_type
field to determine which variant of get_payload to call and returns that
type of payload_t.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
| |
The script_test.py script is used to generate data .cpp files from a
wireshark trace for the C++ CHDR Parser tests. This commit expands the
script to also generate the data .py files for the Python CHDR Parser
tests.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds pybind11 glue code for the userland chdr parsing code
introduced in the uhd::utils::chdr namespace. Additionally, it moves
some pybind11 adapter code to a common pybind_adaptors.hpp file which
originally existed in the cal_python.hpp file.
This commit also adds unit tests for the python bindings using a
captured wireshark trace which is located in rfnoc_packets_*.py and some
handwritten packets in hardcoded_packets.py
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit alters the ctrl_payload#serialize function to assert the
serialized length of the packet fits inside the buffer before writing.
Originally, the function writes the data and then asserts that the final
pointer position isn't further than the end of the buffer. While this
works, if it were to fail, that means we have already caused undefined
behavior by writing to some random memory location, which isn't good
practice.
This commit is possible now that the get_length method exists.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
| |
If the minor compat number does not match (older than expected), then
generate an error message only if argument fail_on_old_minor is True;
generate a warning otherwise.
|
|
|
|
|
|
| |
Microsoft support for Windows 7 ended January 14, 2020. UHD is still
likely to work with Windows 7; however, any future testing/development
will be done with Windows 10.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new public api in uhd::utils which allows serializing
and deserializing chdr packets.
As far as testing, this commit adds the chdr_parse_test test. It uses a
wireshark trace located in rfnoc_packets_*.cpp as well as hand coded
packets from hardcoded_packets.cpp to test the serialization and
deserialization process
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes.
Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and
exposes them publicly in uhd/rfnoc/rfnoc_types.hpp.
Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to
uhd/rfnoc/constants.hpp
Signed-off-by: robot-rover <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
| |
It would be confusing to have two classes named chdr_packet. As it makes
more sense to name the new public chdr parser class chdr_packet, the
internal uhd::rfnoc::chdr::chdr_packet class is being renamed to
chdr_packet_writer to better represent its functionality.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get_lib_path() uses the libuhd location on disk to dynamically
determine the installation prefix at runtime. This fix normalizes the
libuhd path before any path operations are done to extract the library
directory and then prefix directory.
Previously, using a non-normalized library path, the returned prefix
directory would be incorrect in some cases (e.g. when loaded through
GNU Radio). In these error cases, the libuhd path would be
$PREFIX/lib/./libuhd.so
(with a no-op /. inserted) which would result in a technically correct
library directory of `$PREFIX/lib/.` but an incorrect prefix directory
of `$PREFIX/lib`.
With the normalization fix, the libuhd path is corrected to
$PREFIX/lib/libuhd.so
and the subsequent path manipulation to get the library and prefix
directories will work as intended.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The product ID check should be masked with 0xF8 and checked to be 0x08.
With a device off and weak pull-ups, the readback would always read
0xFF, passing the ID check when it obviously wasn't there. Extending
the mask to be 0xF8 shows that both 0's and 1's are read back from the
device.
|
|
|
|
|
|
| |
Letting garbage collection close the file works when using CPython, but
it fails with PyPy which uses a different garbage collection strategy.
This makes sure that the file is closed by using a file context manager.
|
| |
|
|
|
|
|
| |
This adds some more details on mpm.conf, what it does, how it works, and
which keys it accepts.
|
|
|
|
|
|
|
|
| |
No functional changes. Fixes for things that PyLint complains about, but
are safe to change anyway, as well as a minor improvement to a docstring
that referenced non-existant args.
This touches files that are mpm.conf-related.
|
|
|
|
|
|
|
|
| |
This effectively reverts 0433e74. The set_shutdown() and get_shutdown()
API calls do not have a counterpart in simple_spi_core.v, which is
typically the HDL endpoint for this core driver, and thus could write to
a non-existent register. They are also never used in UHD, nor are they
part of the spi_iface interface.
|
|
|
|
| |
This removes some comment that include code that still gets executed.
|
|
|
|
|
|
|
| |
io_type's implementation was removed when host/lib/depricated.cpp was
removed. This commit also removes the hpp and installation.
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
| |
Unused CHDR port was not being drained of discovery packets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rnfoc/xport section is refactored in System Verilog to allow the
following improvements
(1) CPU_W - Sets the size of the c2e and e2c pipes. This can be run
at a different clock rate than the main ethernet pipe
(2) CHDR_W - Sets the size of the v2e and e2v pipes. This can be run
at a different clock rate than the main ethernet pipe
(3) ENET_W - Sets the size of the eth_tx and eth_rx pipes.
eth_interface_tb runs traffic from e2c,e2v,v2e,c2e simultaneously
against the original xport_sv implementation, and against the new
implementation with widths of 64/128/512. A chdr_management node
info request queries the port info of the node0 in the eth_interface.
eth_ifc_synth_test.sv can be compiled with the make xsim target to test
out the size of various configurations.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|