URL
https://opencores.org/ocsvn/wb4pb/wb4pb/trunk
[/] [wb4pb/] [trunk/] [rtl/] [picoblaze_wb_gpio.v] - Diff between revs 2 and 10
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 10 |
Line 87... |
Line 87... |
parameter IS_INPUT = 1'b0;
|
parameter IS_INPUT = 1'b0;
|
parameter IS_OUTPUT = ! IS_INPUT;
|
parameter IS_OUTPUT = ! IS_INPUT;
|
integer i;
|
integer i;
|
|
|
// reset synchronisation
|
// reset synchronisation
|
always@(clk) begin
|
always@(clk)
|
rst <= p_rst_i;
|
rst <= p_rst_i;
|
end
|
|
assign clk = p_clk_i;
|
assign clk = p_clk_i;
|
|
|
// module instances
|
// module instances
|
///////////////////
|
///////////////////
|
|
|
Line 153... |
Line 152... |
.gpio_oe_o(gpio_oe)
|
.gpio_oe_o(gpio_oe)
|
);
|
);
|
|
|
// i/o buffer generation
|
// i/o buffer generation
|
assign gpio_in = p_gpio_io;
|
assign gpio_in = p_gpio_io;
|
always@(gpio_oe or gpio_out) begin
|
always@(gpio_oe or gpio_out)
|
for (i = 0; i <= 7; i = i + 1) begin
|
for (i = 0; i <= 7; i = i + 1)
|
if (gpio_oe[i] == IS_OUTPUT)
|
if (gpio_oe[i] == IS_OUTPUT)
|
gpio[i] = gpio_out[i];
|
gpio[i] = gpio_out[i];
|
else
|
else
|
gpio[i] = 1'bZ;
|
gpio[i] = 1'bZ;
|
end
|
|
end
|
|
assign p_gpio_io = gpio;
|
assign p_gpio_io = gpio;
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.