OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [autogen/] [icache_control_ram.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
//======================================================== conditions
2
wire cond_0 = init_done == `FALSE;
3
wire cond_1 = invd_counter == 8'd255;
4
wire cond_2 = state == STATE_IDLE;
5
wire cond_3 = init_done && invdcode_do;
6
wire cond_4 = state == STATE_INVD;
7
//======================================================== saves
8
wire  after_invalidate_to_reg =
9
    (cond_0 && cond_1)? ( `TRUE) :
10
    (cond_2)? ( `FALSE) :
11
    (cond_4 && cond_1)? ( `TRUE) :
12
    after_invalidate;
13
wire [7:0] invd_counter_to_reg =
14
    (cond_0)? ( invd_counter + 8'd1) :
15
    (cond_4)? ( invd_counter + 8'd1) :
16
    invd_counter;
17
wire  state_to_reg =
18
    (cond_2 && cond_3)? ( STATE_INVD) :
19
    (cond_4 && cond_1)? ( STATE_IDLE) :
20
    state;
21
wire  init_done_to_reg =
22
    (cond_0 && cond_1)? ( `TRUE) :
23
    init_done;
24
//======================================================== always
25
always @(posedge clk or negedge rst_n) begin
26
    if(rst_n == 1'b0) after_invalidate <= 1'd0;
27
    else              after_invalidate <= after_invalidate_to_reg;
28
end
29
always @(posedge clk or negedge rst_n) begin
30
    if(rst_n == 1'b0) invd_counter <= 8'd0;
31
    else              invd_counter <= invd_counter_to_reg;
32
end
33
always @(posedge clk or negedge rst_n) begin
34
    if(rst_n == 1'b0) state <= 1'd0;
35
    else              state <= state_to_reg;
36
end
37
always @(posedge clk or negedge rst_n) begin
38
    if(rst_n == 1'b0) init_done <= 1'd0;
39
    else              init_done <= init_done_to_reg;
40
end
41
//======================================================== sets
42
assign invdcode_done =
43
    (cond_4 && cond_1)? (`TRUE) :
44
    1'd0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.