Indent code-blocks

This commit is contained in:
bbleaptrot 2021-03-23 17:29:34 -06:00 committed by GitHub
parent 34a1df858b
commit 191ce358c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 44 deletions

View File

@ -16,7 +16,7 @@ Go to line 187 and replace it with:
.. code-block:: XML .. code-block:: XML
<circuit_model type="hard_logic" name="ADDF" prefix="ADDF" is_default="true" spice_netlist="${OPENFPGA_PATH}/openfpga_flow/openfpga_cell_library/spice/adder.sp" verilog_netlist=""> <circuit_model type="hard_logic" name="ADDF" prefix="ADDF" is_default="true" spice_netlist="${OPENFPGA_PATH}/openfpga_flow/openfpga_cell_library/spice/adder.sp" verilog_netlist="">
Motivation Motivation
~~~~~~~~~~ ~~~~~~~~~~
@ -58,52 +58,52 @@ To implement our own ADDF module, we need to remove all other module definitions
.. code-block:: Verilog .. code-block:: Verilog
//------------------------------------------- //-------------------------------------------
// FPGA Synthesizable Verilog Netlist // FPGA Synthesizable Verilog Netlist
// Description: Template for user-defined Verilog modules // Description: Template for user-defined Verilog modules
// Author: Xifan TANG // Author: Xifan TANG
// Organization: University of Utah // Organization: University of Utah
// Date: Fri Mar 19 10:05:32 2021 // Date: Fri Mar 19 10:05:32 2021
//------------------------------------------- //-------------------------------------------
//----- Time scale ----- //----- Time scale -----
`timescale 1ns / 1ps `timescale 1ns / 1ps
// ----- Template Verilog module for ADDF -----
//----- Default net type -----
`default_nettype none
// ----- Verilog module for ADDF -----
module ADDF(A,
B,
CI,
SUM,
CO);
//----- INPUT PORTS -----
input [0:0] A;
//----- INPUT PORTS -----
input [0:0] B;
//----- INPUT PORTS -----
input [0:0] CI;
//----- OUTPUT PORTS -----
output [0:0] SUM;
//----- OUTPUT PORTS -----
output [0:0] CO;
//----- BEGIN wire-connection ports -----
//----- END wire-connection ports -----
//----- BEGIN Registered ports -----
//----- END Registered ports -----
// ----- Template Verilog module for ADDF ----- // ----- Internal logic should start here -----
//----- Default net type ----- assign SUM = A ^ B ^ CI;
`default_nettype none assign CO = (A & B) | (A & CI) | (B & CI);
// ----- Internal logic should end here -----
// ----- Verilog module for ADDF ----- endmodule
module ADDF(A, // ----- END Verilog module for ADDF -----
B,
CI,
SUM,
CO);
//----- INPUT PORTS -----
input [0:0] A;
//----- INPUT PORTS -----
input [0:0] B;
//----- INPUT PORTS -----
input [0:0] CI;
//----- OUTPUT PORTS -----
output [0:0] SUM;
//----- OUTPUT PORTS -----
output [0:0] CO;
//----- BEGIN wire-connection ports -----
//----- END wire-connection ports -----
//----- BEGIN Registered ports -----
//----- END Registered ports -----
// ----- Internal logic should start here -----
assign SUM = A ^ B ^ CI;
assign CO = (A & B) | (A & CI) | (B & CI);
// ----- Internal logic should end here -----
endmodule
// ----- END Verilog module for ADDF -----
We can now link this ``user_defined_templates.v`` into ``k6_frac_N10_adder_chain_40nm_openfpga.xml``. We can now link this ``user_defined_templates.v`` into ``k6_frac_N10_adder_chain_40nm_openfpga.xml``.