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

Subversion Repositories tv80

[/] [tv80/] [branches/] [restruc1/] [rtl/] [core/] [tv80s.v] - Diff between revs 2 and 21

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 21
Line 61... Line 61...
  wire          intcycle_n;
  wire          intcycle_n;
  wire          no_read;
  wire          no_read;
  wire          write;
  wire          write;
  wire          iorq;
  wire          iorq;
  reg [7:0]     di_reg;
  reg [7:0]     di_reg;
  wire [2:0]    mcycle;
  wire [6:0]    mcycle;
  wire [2:0]    tstate;
  wire [6:0]    tstate;
 
 
  assign    cen = 1;
  assign    cen = 1;
 
 
  tv80_core i_tv80_core
  tv80_core i_tv80_core
    (
    (
Line 109... Line 109...
        begin
        begin
          rd_n <= #1 1'b1;
          rd_n <= #1 1'b1;
          wr_n <= #1 1'b1;
          wr_n <= #1 1'b1;
          iorq_n <= #1 1'b1;
          iorq_n <= #1 1'b1;
          mreq_n <= #1 1'b1;
          mreq_n <= #1 1'b1;
          if (mcycle == 3'b001)
          if (mcycle[0])
            begin
            begin
              if (tstate == 3'b001 || (tstate == 3'b010 && wait_n == 1'b0))
              if (tstate[1] || (tstate[2] && wait_n == 1'b0))
                begin
                begin
                  rd_n <= #1 ~ intcycle_n;
                  rd_n <= #1 ~ intcycle_n;
                  mreq_n <= #1 ~ intcycle_n;
                  mreq_n <= #1 ~ intcycle_n;
                  iorq_n <= #1 intcycle_n;
                  iorq_n <= #1 intcycle_n;
                end
                end
              if (tstate == 3'b011)
              if (tstate[3])
                mreq_n <= #1 1'b0;
                mreq_n <= #1 1'b0;
            end // if (mcycle == 3'b001)          
            end // if (mcycle[0])          
          else
          else
            begin
            begin
              if ((tstate == 3'b001 || (tstate == 3'b010 && wait_n == 1'b0)) && no_read == 1'b0 && write == 1'b0)
              if ((tstate[1] || (tstate[2] && wait_n == 1'b0)) && no_read == 1'b0 && write == 1'b0)
                begin
                begin
                  rd_n <= #1 1'b0;
                  rd_n <= #1 1'b0;
                  iorq_n <= #1 ~ iorq;
                  iorq_n <= #1 ~ iorq;
                  mreq_n <= #1 iorq;
                  mreq_n <= #1 iorq;
                end
                end
              if (T2Write == 0)
              if (T2Write == 0)
                begin
                begin
                  if (tstate == 3'b010 && write == 1'b1)
                  if (tstate[2] && write == 1'b1)
                    begin
                    begin
                      wr_n <= #1 1'b0;
                      wr_n <= #1 1'b0;
                      iorq_n <= #1 ~ iorq;
                      iorq_n <= #1 ~ iorq;
                      mreq_n <= #1 iorq;
                      mreq_n <= #1 iorq;
                    end
                    end
                end
                end
              else
              else
                begin
                begin
                  if ((tstate == 3'b001 || (tstate == 3'b010 && wait_n == 1'b0)) && write == 1'b1)
                  if ((tstate[1] || (tstate[2] && wait_n == 1'b0)) && write == 1'b1)
                    begin
                    begin
                      wr_n <= #1 1'b0;
                      wr_n <= #1 1'b0;
                      iorq_n <= #1 ~ iorq;
                      iorq_n <= #1 ~ iorq;
                      mreq_n <= #1 iorq;
                      mreq_n <= #1 iorq;
                  end
                  end
                end // else: !if(T2write == 0)
                end // else: !if(T2write == 0)
 
 
            end // else: !if(mcycle == 3'b001)
            end // else: !if(mcycle[0])
 
 
          if (tstate == 3'b010 && wait_n == 1'b1)
          if (tstate[2] && wait_n == 1'b1)
            di_reg <= #1 di;
            di_reg <= #1 di;
        end // else: !if(!reset_n)
        end // else: !if(!reset_n)
    end // always @ (posedge clk or negedge reset_n)
    end // always @ (posedge clk or negedge reset_n)
 
 
endmodule // t80s
endmodule // t80s

powered by: WebSVN 2.1.0

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