Network Model
|
This is an example of an event driven SystemC-based network hardware model.
Structure
The model includes 2 types of modules: A single Router, that's connected to multiple Nodes.
Several Nodes are connected to the Router's input ports, and several Nodes are connected to the Router's output ports.
The number of Router input and output ports is programmable at build time.
These modules are connected to each other via point-to-point FIFOs, mimicking bus interfaces. The type of those interfaces is defined in:
TOT/soc_network_model/src/bus_types.hpp .
Operation
Each Node, that's connected to a Router's input port, produces a number of transactions, as specified in a configuration input file.
Those transactions are directed by the Router to a destination Node.
This model uses functionality from a utility library, simlib :
- Hardware Buffer
- Command line processing
- Print-out control
Module Testing
A Node module has its own accompanying test, for debugging purposes.
How to Build
To compile and build the included code, you first need to define 2 environment variables in your shell:
Module Building
Compile each module and its test from their respective source directory, by calling make.
The build is done in a directory related to the selected build type - either debug, release or profile.
By default, make will build the debug version of your code, and place it in the build/debug directory.
To build any other type, add 'BUILT=type' on the command line. E.g., to build the release version of your code, and place it in the build/release directory, do:
make BUILD=release
Model Building
Compile the entire model from its base directory, TOT/event_driven_model/src/top, by calling make.
The build is done in a directory related to the selected build type - either debug, release or profile.
By default, make will build the debug version of your library, and place it in the build/debug directory.
To build any other type, add 'BUILT=type' on the command line. E.g., to build the release version of your library, and place it in the build/release directory, do:
make BUILD=release
The build process can be seen in build.log, and running the model can be seen in run.log .
Calling the model without any command line options will show a usage message, detailing all available command line options.
Model Running
See Top.
Structure
The model includes 2 types of modules: A single Router, that's connected to multiple Nodes.
Several Nodes are connected to the Router's input ports, and several Nodes are connected to the Router's output ports.
The number of Router input and output ports is programmable at build time.
These modules are connected to each other via point-to-point FIFOs, mimicking bus interfaces. The type of those interfaces is defined in:
TOT/soc_network_model/src/bus_types.hpp .
Operation
Each Node, that's connected to a Router's input port, produces a number of transactions, as specified in a configuration input file.
Those transactions are directed by the Router to a destination Node.
This model uses functionality from a utility library, simlib :
- Hardware Buffer
- Command line processing
- Print-out control
Module Testing
A Node module has its own accompanying test, for debugging purposes.
How to Build
To compile and build the included code, you first need to define 2 environment variables in your shell:
- TOT
This is the directory where you extracted the ZIP file.
All code and builds reside here. - MAKEFILES_DIR
This is the directory where the helper Makefiles reside.
In the ZIP file, this directory is called makefiles, and is right under TOT.
Module Building
Compile each module and its test from their respective source directory, by calling make.
The build is done in a directory related to the selected build type - either debug, release or profile.
By default, make will build the debug version of your code, and place it in the build/debug directory.
To build any other type, add 'BUILT=type' on the command line. E.g., to build the release version of your code, and place it in the build/release directory, do:
make BUILD=release
Model Building
Compile the entire model from its base directory, TOT/event_driven_model/src/top, by calling make.
The build is done in a directory related to the selected build type - either debug, release or profile.
By default, make will build the debug version of your library, and place it in the build/debug directory.
To build any other type, add 'BUILT=type' on the command line. E.g., to build the release version of your library, and place it in the build/release directory, do:
make BUILD=release
The build process can be seen in build.log, and running the model can be seen in run.log .
Calling the model without any command line options will show a usage message, detailing all available command line options.
Model Running
See Top.