URL
https://opencores.org/ocsvn/xgate/xgate/trunk
[/] [xgate/] [trunk/] [rtl/] [verilog/] [xgate_irq_encode.v] - Diff between revs 72 and 96
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 72 |
Rev 96 |
Line 1... |
Line 1... |
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
//
|
//
|
// Computer Operating Properly - XGATE interrupt encoder
|
// XGATE Coprocessor - XGATE interrupt encoder
|
//
|
//
|
// Author: Bob Hayes
|
// Author: Bob Hayes
|
// rehayes@opencores.org
|
// rehayes@opencores.org
|
//
|
//
|
// Downloaded from: http://www.opencores.org/projects/xgate.....
|
// Downloaded from: http://www.opencores.org/projects/xgate.....
|
Line 47... |
Line 47... |
input [MAX_CHANNEL:1] chan_req_i, // XGATE Interrupt requests from peropherials
|
input [MAX_CHANNEL:1] chan_req_i, // XGATE Interrupt requests from peropherials
|
input [MAX_CHANNEL:1] chan_bypass, // XGATE Interrupt bypass
|
input [MAX_CHANNEL:1] chan_bypass, // XGATE Interrupt bypass
|
input [MAX_CHANNEL:1] xgif_status // Interrupt outputs from RISC core
|
input [MAX_CHANNEL:1] xgif_status // Interrupt outputs from RISC core
|
);
|
);
|
|
|
|
integer i; // Loop Counter for array index
|
wire [MAX_CHANNEL:1] chan_ena_gate; // Ouptut of channel enable gating
|
wire [MAX_CHANNEL:1] chan_ena_gate; // Ouptut of channel enable gating
|
|
|
// Pass non-bypassed interrupt inputs to XGATE RISC
|
// Pass non-bypassed interrupt inputs to XGATE RISC
|
assign chan_ena_gate = ~chan_bypass & chan_req_i;
|
assign chan_ena_gate = ~chan_bypass & chan_req_i;
|
|
|
// Set int_reg to the index of the index of the lowest chan_req_i input that is active
|
// Set int_reg to the index of the index of the lowest chan_req_i input that is active
|
integer i = 0;
|
|
always @(chan_ena_gate)
|
always @(chan_ena_gate)
|
begin
|
begin
|
int_req = 0;
|
int_req = 0;
|
for (i = MAX_CHANNEL; i >= 1; i = i - 1)
|
for (i = MAX_CHANNEL; i >= 1; i = i - 1)
|
if (chan_ena_gate[i] == 1'b1)
|
if (chan_ena_gate[i] == 1'b1)
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.