Formatting

This commit is contained in:
Ross Thompson 2023-01-18 17:14:37 -06:00
parent 520209363d
commit 92f04f055c

View File

@ -1,16 +1,17 @@
/////////////////////////////////////////// ///////////////////////////////////////////
// controller input stage // controller input stage
// //
// Written: Ross Thompson August 31, 2022 // Written: Ross Thompson ross1728@gmail.com
// ross1728@gmail.com // Created: August 31, 2022
// Modified: // Modified: 18 January 2023
// //
// Purpose: AHB multi controller interface to merge LSU and IFU controls. // Purpose: AHB multi controller interface to merge LSU and IFU controls.
// See ARM_HIH0033A_AMBA_AHB-Lite_SPEC 1.0 // See ARM_HIH0033A_AMBA_AHB-Lite_SPEC 1.0
// Arbitrates requests from instruction and data streams // Arbitrates requests from instruction and data streams
// Connects core to peripherals and I/O pins on SOC // Connects core to peripherals and I/O pins on SOC
// Bus width presently matches XLEN // Bus width presently matches XLEN
// Anticipate replacing this with an AXI bus interface to communicate with FPGA DRAM/Flash controllers //
// Documentation: RISC-V System on Chip Design Chapter 6 (Figure 6.25)
// //
// A component of the CORE-V-WALLY configurable RISC-V project. // A component of the CORE-V-WALLY configurable RISC-V project.
// //
@ -32,25 +33,29 @@
`include "wally-config.vh" `include "wally-config.vh"
module controllerinputstage #(parameter SAVE_ENABLED = 1) ( module controllerinputstage #(
input logic HCLK, parameter SAVE_ENABLED = 1 // 1: Save manager inputs if Save = 1, 0: Don't save inputs
input logic HRESETn, )(
input logic Save, Restore, Disable, input logic HCLK,
output logic Request, input logic HRESETn,
input logic Save, // Two or more managers requesting (HTRANS != 00) at the same time. Save the non-granted manager inputs
input logic Restore, // Restore a saved manager inputs when it is finally granted
input logic Disable, // Supress HREADY to the non-granted manager
output logic Request, // This manager is making a request
// controller input // controller input
input logic HWRITEIn, input logic [1:0] HTRANSIn, // Manager input. AHB transaction type, 00: IDLE, 10 NON_SEQ, 11 SEQ
input logic [2:0] HSIZEIn, input logic HWRITEIn, // Manager input. AHB 0: Read operation 1: Write operation
input logic [2:0] HBURSTIn, input logic [2:0] HSIZEIn, // Manager input. AHB transaction width
input logic [1:0] HTRANSIn, input logic [2:0] HBURSTIn, // Manager input. AHB burst length
input logic [`PA_BITS-1:0] HADDRIn, input logic [`PA_BITS-1:0] HADDRIn, // Manager input. AHB address
output logic HREADYOut, output logic HREADYOut, // Indicate to manager the peripherial is not busy and another manager does not have priority
// controller output // controller output
output logic HWRITEOut, output logic [1:0] HTRANSOut, // Aribrated manager transaction. AHB transaction type, 00: IDLE, 10 NON_SEQ, 11 SEQ
output logic [2:0] HSIZEOut, output logic HWRITEOut, // Aribrated manager transaction. AHB 0: Read operation 1: Write operation
output logic [2:0] HBURSTOut, output logic [2:0] HSIZEOut, // Aribrated manager transaction. AHB transaction width
output logic [1:0] HTRANSOut, output logic [2:0] HBURSTOut, // Aribrated manager transaction. AHB burst length
output logic [`PA_BITS-1:0] HADDROut, output logic [`PA_BITS-1:0] HADDROut, // Aribrated manager transaction. AHB address
input logic HREADYIn input logic HREADYIn // Peripherial ready
); );
logic HWRITESave; logic HWRITESave;