VHDLToolbox is a collection of very simple VHDL components from which systems can be made.
Produces a stream of data out1 by adding in1 to in2 item by item.
Produces a stream of data out1 by adding in1 to in2 item by item.
Raise an exception if in1 is 0.
Output constant value repeatedly.
A counter component
- The first data item in the sequence is defined by the start parameter.
- Subsequent data item in the sequence are ncremented by the step parameter.
- The counter may reach, but not exceed the stop parameter.
- Any count in excess of stop will return the counter to the start value.
Write a stream of data to the console.
Discard all data on in1. Useful to avoid unconnected outputs.
Produces a stream of data out1 by dividing in1 by in2 item by item.
Produces a stream of data out1 which is 1 if in1 equals in2 or 0 otherwise.
Store up to depth data items.
Produces a stream of data out1 which is 1 if in1 is greater_than_or_equal to in2 or 0 otherwise.
Send and receive Ethernet packets. Using a Ethernet Physical Interface.
Features:
- Supports 1Gbit/s ethernet only via a gmii interface.
- Supports full duplex mode only.
Interface
input: | TX - Data to send (16 bits). |
---|---|
output: | RX - Data to send (16 bits). |
Ethernet Packet Structure -
Description | destination | source | length | payload | padding | FSC |
---|---|---|---|---|---|---|
Bytes | 6 | 6 | 2 | 0-1500 | 0-46 | 4 |
Notes:
- The length field is the length of the ethernet payload.
- The Ethernet Output block will automatically append the FSC to outgoing packets.
- The FSC of incoming packets will be checked, and bad packets will be discarded. The FSC will be stripped from incoming packets.
- The length of the payload + padding must be 46-1500 bytes.
- Incoming packets of incorrect length will be discarded.
The first 16 bit word on the TX input is interpreted as the length of the packet in bytes (including the MAC address, length and payload, but not the preamble or FSC). Subsequent words on the TX input are interpreted as the content of the packet. If length is an odd number of bytes, then the least significant byte of the last word will be ignored. The FSC will be appended for you, but you need to supply the destination, source and length fields.
The first 16 bit word on the RX output will be the length of the packet in bytes (including the MAC address, length and payload, but not the preamble or FSC). Subsequent words on the RX output will be the content of the packet. If length is an odd number of bytes, then the least significant byte of the last word will not contain usefull data. The FSC will be stripped from incoming packets, but the destination, source and length fields will be included.
This component used two clocks, the local clock used to transfer data between components, and a 125MHz clock source for sending data to the Ethernet physical interface. This clock is also forwarded along with the data to the ethernet phy.
Produces a stream of data out1 which is 1 if in1 is greater_than to in2 or 0 otherwise.
Read a stream of data from a text file in ASCII decimal representation.
output: | out1 - The output data stream |
---|---|
parameter: | bits - The width in bits of the output data stream |
parameter: | filename - The file name of the input file. |
Device input pin.
Produces a stream of data out1 by left shifting in1 by in2 places item by item.
input: | in1 - input stream of numbers to be shifted |
---|---|
input: | in2 - input stream of amount to shift by |
output: | out1 - output stream containing shifted data |
paremeter: | bits - the width of in1, in2 and out1 straddereams in bits |
Both in1 and in2 are treated as signed numbers, if in2 is negative, in1 will be shifted right. If a right shift occurs, the value will be sign extended.
Produces a stream of data out1 which is 1 if in1 is less_than_or_equal to in2 or 0 otherwise.
Produces a stream of data out1 which is 1 if in1 is less_than to in2 or 0 otherwise.
Produces a stream of data out1 by dividing in1 by in2 item by item.
Produces a stream of data out1 by multiplying in1 by in2 item by item.
Produces a stream of data out1 by which is 1 if in1 is equal to in2 or 0 otherwise.
Produces a stream of data out1 which is the bitwise OR of in1 and in2.
Write a stream of data to a text file as an ASCII decimal representation.
input: | in1 - The input data stream |
---|---|
parameter: | bits - The width in bits of the input data stream |
parameter: | filename - The file name of the output file. |
Send a stream of data to a device pin(s).
Produces a stream of data out1 by resizing in1 item by item.
Interface
input: | in1 - input stream of numbers to be resized |
---|---|
output: | out1 - output stream containing resized data |
parameter: | input_bits - the width of in1 in bits |
parameter: | output_bits - the width of out1 in bits |
Both in1 is treated as a signed number. If output_bits is greater than input_bits then in1 will be sign extended. If input_bits is greater than output_bits then in1 will be truncated.
Produces a stream of data out1 by right shifting in1 by in2 places item by item.
input: | in1 - input stream of numbers to be shifted |
---|---|
input: | in2 - input stream of amount to shift by |
output: | out1 - output stream containing shifted data |
paremeter: | bits - the width of in1, in2 and out1 straddereams in bits |
Both in1 and in2 are treated as signed numbers, if in2 is negative, in1 will be shifted left. If a right shift occurs, the value will be sign extended.
Read a stream of data from a serial UART using 8N1 convention.
- baud_rate
- clock frequency
Write a stream of data to a serial UART using 8N1 convention
- baud_rate
- clock frequency
Produces a stream of data out1 by subtracting in2 from in1 item by item.
Create two streams from one.
Produces a stream of data out1 which is the bitwise XOR of in1 and in2.