URL
https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk
[/] [xulalx25soc/] [trunk/] [rtl/] [rtclight.v] - Diff between revs 21 and 113
Show entire file |
Details |
Blame |
View Log
Rev 21 |
Rev 113 |
Line 64... |
Line 64... |
reg [21:0] clock;
|
reg [21:0] clock;
|
reg [31:0] stopwatch, ckspeed;
|
reg [31:0] stopwatch, ckspeed;
|
reg [25:0] timer;
|
reg [25:0] timer;
|
|
|
wire ck_sel, tm_sel, sw_sel, sp_sel, al_sel;
|
wire ck_sel, tm_sel, sw_sel, sp_sel, al_sel;
|
assign ck_sel = ((i_wb_cyc)&&(i_wb_stb)&&(i_wb_addr[2:0]==3'b000));
|
assign ck_sel = ((i_wb_stb)&&(i_wb_addr[2:0]==3'b000));
|
assign tm_sel = ((i_wb_cyc)&&(i_wb_stb)&&(i_wb_addr[2:0]==3'b001));
|
assign tm_sel = ((i_wb_stb)&&(i_wb_addr[2:0]==3'b001));
|
assign sw_sel = ((i_wb_cyc)&&(i_wb_stb)&&(i_wb_addr[2:0]==3'b010));
|
assign sw_sel = ((i_wb_stb)&&(i_wb_addr[2:0]==3'b010));
|
assign al_sel = ((i_wb_cyc)&&(i_wb_stb)&&(i_wb_addr[2:0]==3'b011));
|
assign al_sel = ((i_wb_stb)&&(i_wb_addr[2:0]==3'b011));
|
assign sp_sel = ((i_wb_cyc)&&(i_wb_stb)&&(i_wb_addr[2:0]==3'b100));
|
assign sp_sel = ((i_wb_stb)&&(i_wb_addr[2:0]==3'b100));
|
|
|
reg [39:0] ck_counter;
|
reg [39:0] ck_counter;
|
reg ck_carry;
|
reg ck_carry;
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
{ ck_carry, ck_counter } <= ck_counter + { 8'h00, ckspeed };
|
{ ck_carry, ck_counter } <= ck_counter + { 8'h00, ckspeed };
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.