Line 60... |
Line 60... |
output reg clear_xgif_1, // Strobe for decode to clear interrupt flag bank 1
|
output reg clear_xgif_1, // Strobe for decode to clear interrupt flag bank 1
|
output reg clear_xgif_0, // Strobe for decode to clear interrupt flag bank 0
|
output reg clear_xgif_0, // Strobe for decode to clear interrupt flag bank 0
|
output reg [15:0] clear_xgif_data, // Data for decode to clear interrupt flag
|
output reg [15:0] clear_xgif_data, // Data for decode to clear interrupt flag
|
output semaph_stat, // Return Status of Semaphore bit
|
output semaph_stat, // Return Status of Semaphore bit
|
output reg brk_irq_ena, // Enable BRK instruction to generate interrupt
|
output reg brk_irq_ena, // Enable BRK instruction to generate interrupt
|
output [MAX_CHANNEL:0] chan_bypass, // XGATE Interrupt enable or bypass
|
output [MAX_CHANNEL:1] chan_bypass, // XGATE Interrupt enable or bypass
|
output reg [127:0] irq_bypass, // Register to hold irq bypass control state
|
output reg [127:1] irq_bypass, // Register to hold irq bypass control state
|
|
|
input bus_clk, // Control register bus clock
|
input bus_clk, // Control register bus clock
|
input async_rst_b, // Async reset signal
|
input async_rst_b, // Async reset signal
|
input sync_reset, // Syncronous reset signal
|
input sync_reset, // Syncronous reset signal
|
input [15:0] write_bus, // Write Data Bus
|
input [15:0] write_bus, // Write Data Bus
|
Line 94... |
Line 94... |
|
|
integer j; // Loop counter for channel bypass counter assigments
|
integer j; // Loop counter for channel bypass counter assigments
|
integer k; // Loop counter for channel bypass counter assigments
|
integer k; // Loop counter for channel bypass counter assigments
|
|
|
// registers
|
// registers
|
reg [127:0] irq_bypass_d; // Pseudo regester for routing address and data to irq bypass register
|
reg [127:1] irq_bypass_d; // Pseudo regester for routing address and data to irq bypass register
|
|
|
// Wires
|
// Wires
|
wire [ 1:0] write_any_xgif;
|
wire [ 1:0] write_any_xgif;
|
|
|
//
|
//
|
Line 226... |
Line 226... |
|
|
|
|
// Channel Bypass Register input bits
|
// Channel Bypass Register input bits
|
always @*
|
always @*
|
begin
|
begin
|
k = 0;
|
k = 1; // WISHBONE Bus bit counter [15:0]
|
for (j = 0; j <= 127; j = j + 1)
|
for (j = 1; j <= 127; j = j + 1)
|
begin
|
begin
|
if (j <= MAX_CHANNEL)
|
if (j <= MAX_CHANNEL)
|
begin
|
begin
|
if ((j >= 0) && (j < 8))
|
if ((j >= 0) && (j < 8))
|
irq_bypass_d[j] = write_irw_en_0[0] ? write_bus[k] : irq_bypass[j];
|
irq_bypass_d[j] = write_irw_en_0[0] ? write_bus[k] : irq_bypass[j];
|
Line 276... |
Line 276... |
|
|
// Channel Bypass Registers
|
// Channel Bypass Registers
|
// Synthesys should eliminate bits that with D input tied to zero
|
// Synthesys should eliminate bits that with D input tied to zero
|
always @(posedge bus_clk or negedge async_rst_b)
|
always @(posedge bus_clk or negedge async_rst_b)
|
if ( !async_rst_b )
|
if ( !async_rst_b )
|
irq_bypass <= {128{1'b1}};
|
irq_bypass <= {127{1'b1}};
|
else
|
else
|
irq_bypass <= irq_bypass_d;
|
irq_bypass <= irq_bypass_d;
|
|
|
// Alias the register name to the output pin name so only the used bit are carried out
|
// Alias the register name to the output pin name so only the used bit are carried out
|
// assign chan_bypass = {(MAX_CHANNEL+1){1'b1}};
|
assign chan_bypass = irq_bypass[MAX_CHANNEL:1];
|
assign chan_bypass = irq_bypass[MAX_CHANNEL:0];
|
|
|
|
endmodule // xgate_regs
|
endmodule // xgate_regs
|
|
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|