|
1 | 1 | Simulation setup
|
2 | 2 | ================
|
3 | 3 |
|
4 |
| -A simulation example can be found under ``$FAB_ROOT/fabric_files/fabric_icarus_example/``. This has been tested using the open source Icarus Verillog simulator. |
5 |
| - |
6 |
| -To setup the simulation enviroment, an eFPGA top module to instantiate the fabric and the `configuration module`_ are required, as in the example ``eFPGA_v2_top_sky130_sim.v`` |
7 |
| - |
8 |
| -.. code-block:: verilog |
9 |
| - |
10 |
| - module eFPGA_top (I_top, T_top, O_top, A_config_C, B_config_C, CLK, SelfWriteStrobe, SelfWriteData, Rx, ComActive, ReceiveLED, s_clk, s_data); |
11 |
| - ... |
12 |
| - Config Config_inst (...); |
13 |
| - //All Frame data register modules |
14 |
| - ... |
15 |
| - //All Frame select modules |
16 |
| - ... |
17 |
| - eFPGA Inst_eFPGA( |
18 |
| - .Tile_X0Y1_A_I_top(I_top[23]), |
19 |
| - .Tile_X0Y1_B_I_top(I_top[22]), |
20 |
| - .Tile_X0Y2_A_I_top(I_top[21]), |
21 |
| - .Tile_X0Y2_B_I_top(I_top[20]), |
22 |
| - .Tile_X0Y3_A_I_top(I_top[19]), |
23 |
| - .Tile_X0Y3_B_I_top(I_top[18]), |
24 |
| - .Tile_X0Y4_A_I_top(I_top[17]), |
25 |
| - .Tile_X0Y4_B_I_top(I_top[16]), |
26 |
| - .Tile_X0Y5_A_I_top(I_top[15]), |
27 |
| - .Tile_X0Y5_B_I_top(I_top[14]), |
28 |
| - .Tile_X0Y6_A_I_top(I_top[13]), |
29 |
| - .Tile_X0Y6_B_I_top(I_top[12]), |
30 |
| - .Tile_X0Y7_A_I_top(I_top[11]), |
31 |
| - .Tile_X0Y7_B_I_top(I_top[10]), |
32 |
| - .Tile_X0Y8_A_I_top(I_top[9]), |
33 |
| - .Tile_X0Y8_B_I_top(I_top[8]), |
34 |
| - .Tile_X0Y9_A_I_top(I_top[7]), |
35 |
| - .Tile_X0Y9_B_I_top(I_top[6]), |
36 |
| - .Tile_X0Y10_A_I_top(I_top[5]), |
37 |
| - .Tile_X0Y10_B_I_top(I_top[4]), |
38 |
| - .Tile_X0Y11_A_I_top(I_top[3]), |
39 |
| - .Tile_X0Y11_B_I_top(I_top[2]), |
40 |
| - .Tile_X0Y12_A_I_top(I_top[1]), |
41 |
| - .Tile_X0Y12_B_I_top(I_top[0]), |
42 |
| - ... |
43 |
| - ); |
44 |
| - endmodule |
45 |
| -
|
46 |
| -Next, you can assign the input signals to ``O_top`` and the output signals to ``I_top`` under the ``fabulous_tb.v`` testbench. IO mappings are fixed for the top-level user design in the ``test_design/io_wrapper.v``. You will need to modify the number and position of bel mappings in this file if you have changed the height of the fabric from the default of 14 (2 IOs per tile give 28 IO total). |
| 4 | +The following series of commands can be used to easily run a simulation with a test bitstream loaded, using Icarus Verilog: |
| 5 | + |
| 6 | +.. code-block:: console |
| 7 | +
|
| 8 | + cd demo/Test |
| 9 | + ./build_test_design.sh |
| 10 | + ./run_simulation.sh |
47 | 11 |
|
48 | 12 | FABulous comes with 3 different simulation methods _`configuration module`,
|
49 | 13 |
|
|
0 commit comments