📄 readme
字号:
README for FIR===================================================================The example shows how to use the C++modeling with SystemC to model hardware properties. One important aspect ofmodeling with the Systemc classes is that you can use the sameenvironment for different levels of abstraction, from very abstract down to RT-level.My example models a simple FIR filter which reads in samples with each input_valid signal and writing out the result when output_data_ready is high. The filter is a 16 tap FIR filter(fir.cc). The test bench feeds simply ascending values into the FIR(stimulus.cc) and the output issampled (display.cc) and displayed with print statements.The basic structure looks like this:+--------------------------------------------------+| +-----------+ +-----------+ +-----------+ || | | | | | | || | stimuli |---->| FIR |-->| display | || | | | | | | || +-----------+ +-----------+ +-----------+ || || || main |+--------------------------------------------------+In order to compile the example you have to execute 'make'. Pleasenote that the file Makefile.defs contains the location of the SystemCclass library, which might be different for you, depending on yourinstallation. Once the compilation is finished, you will find anexecutable 'run.x'. Once I have evaluated the functionality for the FIR it might beinteresting to "refine" the model further to get an better idea aboutthe complexity of the design. When modeling with C++ using SystemCone can easily refine the FIR filter into a RTL style model.I have refined the FIR process under the assumption that I use 4 cycles to do the whole computation. The structure looks now like this:+---------------------------------------------------+| +-----------+ +------------+ +-----------+ || | | | FIR_top | | | || | stimuli | | +--------+ | | display | || | | | |FIR_FSM | | | | || +-----------+ | +--------+ | +-----------+ || | +--------+ | || | |FIR_data| | || | +--------+ | || main +------------+ |+---------------------------------------------------+I have modeled a state machine(fir_fsm.cc) and a datapath(fir_data.cc)in order to distribute the operations into 4 cycles, which makes themodel more difficult to read, but this models now a "RTL" like view tothe architecture for this design.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -