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

Subversion Repositories rf6809

[/] [rf6809/] [trunk/] [rtl/] [CmodA7/] [cs02SoC_tb.sv] - Blame information for rev 17

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 robfinch
module cs02SoC_tb();
2
reg clk;
3
reg rst;
4
reg [1:0] btn;
5
wire [7:0] MemDB;
6
wire [18:0] adr;
7
wire RamCEn;
8
wire RamOEn;
9
wire RamWEn;
10
 
11
reg [7:0] mainmem [0:524287];
12
always @(posedge clk)
13
if (!RamCEn && !RamWEn)
14
        mainmem[adr] <= MemDB;
15
assign MemDB = (!RamCEn && !RamOEn && RamWEn) ? mainmem[adr] : 8'bz;
16
 
17
initial begin
18
        rst = 1'b0;
19
        btn = 2'b00;
20
        clk = 1'b0;
21
        #100 btn = 2'b11;
22
        #1500 btn = 2'b00;
23
        #20 rst = 1'b1;
24
        #1000 rst = 1'b0;
25
end
26
 
27
always #42.6667 clk = ~clk;
28
 
29
SocCS02 usoc1
30
(
31
        .sysclk(clk),
32
        .btn(btn),
33
        .MemAdr(adr),
34
        .RamCEn(RamCEn),
35
        .RamOEn(RamOEn),
36
        .RamWEn(RamWEn),
37
        .MemDB(MemDB)
38
);
39
 
40
endmodule

powered by: WebSVN 2.1.0

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