Update file_organization.rst
Made similar to the SPICE one
This commit is contained in:
parent
cd301a5bb8
commit
e541834bd0
|
@ -1,86 +1,13 @@
|
|||
Verilog Output File Format
|
||||
Hierarchy of Verilog Output Files
|
||||
============================
|
||||
|
||||
The Verilog is a description language well known by the industry. It won't be explain what is Verilog in this documentation but focus on how this generated Verilog files match previous XML description file. The Verilog files are generated by the FPGA-Verilog tool from XML description file and are structured as follow:
|
||||
All the generated Verilog Netlists are located in the <verilog_dir> as you specify in the command-line options. Under the <verilog_dir>, FPGA-Verilog creates the top file name_top.v and a number of folders: lb (logic blocks), routing and sub_modules.
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
`timescale reference_time/precision_value
|
||||
|
||||
module name_module (
|
||||
input [0:N] name1,
|
||||
.
|
||||
.
|
||||
.
|
||||
input nameX,
|
||||
output [0:M] name2,
|
||||
.
|
||||
.
|
||||
.
|
||||
output nameY );
|
||||
|
||||
wire name;
|
||||
|
||||
assign name3 = name4;
|
||||
|
||||
submodule_name submodule_instantiation_name (
|
||||
IO1,
|
||||
.
|
||||
.
|
||||
.
|
||||
IOZ );
|
||||
|
||||
endmodule;
|
||||
|
||||
* **module name**: is the translation from *<circuit_model name="name_module"/>*.
|
||||
|
||||
* **input [0:N] name1**: is the translation from *<port type="input" prefix="name1" size="N+1"/>*.
|
||||
|
||||
* [0:N] is useful only if the input is a vector ( N>0 ), else it won't appear.
|
||||
* There is as many input lines in Verilog file as in XML file.
|
||||
|
||||
* **output [0:M] name2**: is the translation from *<port type="output" prefix="name2" size="M+1"/>*.
|
||||
|
||||
* [0:M] is useful only if the output is a vector ( M>0 ), else it won't appear.
|
||||
* There is as many output lines in Verilog file as in XML file.
|
||||
|
||||
* **wire name**: create a wire which could be useful for interconnections.
|
||||
|
||||
* **assign name3 = name4**: connect name3 and name4 wires.
|
||||
|
||||
* If name3 is connected only to name4, it could be translated as a *direct interconnect*
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<interconnect>
|
||||
<direct name="link" input="name3" output="name4"/>
|
||||
</interconnect>
|
||||
|
||||
* Else, it could be translated as a *complete interconnect*:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<interconnect>
|
||||
<complete name="link" input="name3" output="name4"/>
|
||||
</interconnect>
|
||||
|
||||
* **submodule_name**: is the module name to instantiate in the module. It's like a *circuit_model* with *circuit_model* composing it (the Multiplexer for example).
|
||||
|
||||
* **submodule_instantiation_name**: is a name created to differentiate many instances of a same submodule in the module. Usually, an underscore followed by a number is used ( _0 or _1 for example).
|
||||
|
||||
* **IO**: for each submodule IO a wire or a module IO as to be linked. IO1 is the first IO declared in the submodule definition. Example of a submodule with 4 IO:
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
submodule_name submodule_instantiation_name (
|
||||
name1, // IO1 should be connected to module input name1
|
||||
nameX, // IO2 should be connected to module input nameX
|
||||
name, // IO3 should be connected to wire name3
|
||||
name2 ); // IO4 should be connected to module output name2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. note:: When Verilog netlist is provided by the user, names in Verliog file must match names in XML files.
|
||||
.. csv-table:: Folder hierarchy of FPGA-Verilog
|
||||
:header: "Folder", "Content"
|
||||
:widths: 10, 20
|
||||
|
||||
"name_top.v", "Contains the top module and calls all the other .v files"
|
||||
"lb", "Logic Block. Contains all the CLBs. The logic_block.v includes all the CLB and is called by the top module afterward"
|
||||
"routing", "Contains all the routing in the circuit. You can find in it the Switch Boxes, the Connection Blocks and the routing needed to connect the different blocks together"
|
||||
"sub_modules", "Contains the modules generated by the flow to build the CLBs"
|
||||
|
|
Loading…
Reference in New Issue