Components/IP/Command decoder

(Difference between revisions)
Jump to: navigation, search
(Script)
(IP)
Line 17: Line 17:
 
The <code>LF (0A<sub>h</sub>)</code> character in the ROM ends the matching search and directly issues a command pulse,
 
The <code>LF (0A<sub>h</sub>)</code> character in the ROM ends the matching search and directly issues a command pulse,
 
without awaiting the end of the command line.
 
without awaiting the end of the command line.
 +
 +
== Generics ==
 +
 +
The generic <code>characterBitNb</code> specifies the number of bits of the <code>charIn</code> input.
 +
 +
The generic <code>commandNb</code> specifies the number of commands looked for in the ROM
 +
and, as such, the number of bits of the <code>command</code> output.
 +
 +
The generic <code>commandLength</code> specifies the maximal length of each command.
 +
Together with <code>commandNb</code>, they define the required size of command ROM.
 +
 +
The generic <code>commandsFile</code> gives the specification of the ASCII file storing the content of the ROM
 +
and, as such, of the commands.
 +
 +
The generic <code>caseSensitive</code> is quite self explanatory.
 +
 +
The generic <code>valueBitNb</code> specifies the number of bits of the hexadecimal values given in the command line.
 +
This corresponds to the number of bits of the <code>value</code> output.
  
 
= Script =
 
= Script =

Revision as of 14:50, 21 September 2021

Contents

This IP can be found on the EDA Repository: svn: https://repos.hevs.ch/svn/eda/

IP

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.

Generics

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.

Script

The script commandDecoder.py generates the ROM data file.

Examples

With the command list :

commands = [
    'version',
    'relays\r',
    'sampling\r',
    "memRead\r",
    "memWrite\r"
]

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
Namespaces
Variants
Actions
Navigation
Browse
Toolbox