Components/IP/Command decoder

From UIT
Revision as of 15:54, 21 September 2021 by Francois.corthay (Talk | contribs)
Jump to: navigation, search


This IP can be found on the EDA Repository: svn:


The block receives a command built out of characters ending with a CR (0Dh) or a LF (0Ah). A number of commands stored in a ROM are compared to the incoming line. A the end of the reception, the output(s) matching with the incoming commands emit a pulse lasting one clock period.

The esc (1Bh) character in the ROM matches any character in the command.

The CR (0Dh) character in the ROM ends the matching search, even if the command continues, e.g. with further parameters.

The LF (0Ah) character in the ROM ends the matching search and directly issues a command pulse, without awaiting the end of the command line.


The generic characterBitNb specifies the number of bits of the charIn input.

The generic commandNb specifies the number of commands looked for in the ROM and, as such, the number of bits of the command output.

The generic commandLength specifies the maximal length of each command. Together with commandNb, they define the required size of command ROM.

The generic commandsFile gives the specification of the ASCII file storing the content of the ROM and, as such, of the commands.

The generic caseSensitive is quite self explanatory.

The generic valueBitNb specifies the number of bits of the hexadecimal values given in the command line. This corresponds to the number of bits of the value output.


The script generates the ROM data file.

Obviously, the variables command_bit_nb and command_length have to match the generics of the VHDL entity.


With the command list :

commands = [

Unknown command

The command Hello world will pulse the endOfCommand signal, but with none of the command bits active.

Bare command

The command version will pulse the endOfCommand signal with bit command(1) active.

Personal tools