Group Signals

NSL can use a set of signals as a group.

Example-NS04

declare NS04 { input a[8],b[8]; output f[8]; } module NS04 { f = a + b; }



This example uses IO definitions and core behavior description. All terminals are defined as 8 bit group signals. It operates logic functions between input terminals and then transfers the result to an output terminal. The core behavior description in this example is:

f = a + b

It is an easy operation and you may image the result. We will make a simulation on this circuitry as following command:

# ./exe NS04



The result will be available on your console.



a: 36, b:129, f:165 a: 9, b: 99, f:108 a: 13, b:141, f:154 a:101, b: 18, f:119



You can show the waveform style output with following command.

# ./exe -wave NS04



PREV UP NEXT