01. I/O structure element


I/O structure element indicates the data terminal and the control terminal
that is input or output to the module.
Declaration statement is needed to use the I/O structure element in NSL module.
The following Table 1-1 shows the I/O structure element in NSL.

<<Table 1-1.Table of I/O structure element>>
Declaration command Meaning
input
output
inout
func_in
func_out
Data input terminal
Data output terminal
Data input and output terminal
Control input terminal
Control output terminal

Declaration of data input terminal/data output terminal

Data terminal indicates a signal line that sends and receives a data of numerical values.
Data input terminal/data output terminal indicates a data terminal that is directed in the input direction/output direction of each module.
As for both of the data input terminal and the data output terminal, it can set “bit width” by enclosing it with [ ] in the back of a signal name.
At the bit width is omitted, it becomes a signal line in 1-bit width.
Data input terminal, data output terminal is declared as follows.

input Input_signal_name[bit_width]
output Output_signal_name[bit_width]

Declaration of data I/O terminal

The data I/O terminal indicates a line that can correspond to both the input and the output.
Bit width of the data I/O terminal can also omit the bit width just as the declaration of data input terminal/data output terminal.
The following shows the declaration method of the data I/O terminal.

inout I/O_signal_name[bit_width]

Let’s see Example 1 as a usage example of the I/O terminal.

<<Example 1. Data input terminal and Data output terminal>>
declare ex01 {
   //Declaration of Data_input_terminal and Data_output_terminal
   input a ;
   output b ;
}
module ex01 {
   //Common action description part
   b = a ; //Expression 1
}

The Example 1 indicates a module that has “data input terminal”, and “data output terminal”.

Expression 1 indicates an operation that
“data input terminal a is assigned to the data output terminal b”.

The simulation result of Example 1 is as follows.

PAGE TOP