2 // Copyright (C) 2008 Tomasz Malesinski <tmal@mimuw.edu.pl>
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 parameter monitor
= 0;
30 $readmemh("os/atarios.memh", u_atari.u_rom.memory
);
32 $monitor("%g\t pc=%h a=%h x=%h y=%h f=%b s=%h",
45 $writememh("ram.memh", u_atari.u_ram.memory
);
49 always @ (posedge clk
) begin
50 if (u_atari.adr
>= 'hd000
&& u_atari.adr
< 'hd800
) begin
52 $display("hardware write %h = %h at %h",
53 u_atari.adr
, u_atari.slavedat_o
, u_atari.u_cpu.pc
);
55 $display("hardware read %h = %h at %h",
56 u_atari.adr
, u_atari.masterdat_o
, u_atari.u_cpu.pc
);
60 clkgen
u_clkgen(.
clk_o(clk
), .
clk2_o(clk2
));
61 atari
u_atari(.
clk_i(clk
), .
clk2_i(clk2
), .
rst_i(rst_o
));