File name
TTL74245_TypeB.nsl
Function
8bit bidirection bus x 2port code. NSL version of TTL74245 standard logic.
I/O signal
Port_A=8bit bidirection bus.
Port_B=8bit bidirection bus.
DIR=Direction.’1′ is Port_A to Port_B, ‘0′ is Port_B to Port_A.
nOE=Output enable.’0′ is active. ‘1′ is turn off and Hi-Z.
Specification
This code shown function input signal and hi-impedance signal example.
This code includes internal function signal of ‘output_AtoB()’ and ‘output_BtoA’.
These signal is asserted by ‘nOE’ and ‘DIR’ signals.
At function signal is asserted, a function block will be called.
In this code case, function block equation make data transfer operation.
An output port which is declared as ‘output’ or ‘inout’, and is is not controlled any signal, thus it port will be ‘Hi-Z’ state.
Note
This code style is a little bit bigger than TypeA/TypeC example code.
However this code style keep ‘code readability’ against others.