(dcount == 2'b10) ? periods[2] :
periods[3]) };
- always @ (negedge clk) begin
+ always @ (posedge clk) begin
if (clkdv == 31) begin
clkdv <= 0;
dcount <= dcount + 1;
imasked[3] ? 8'h58 :
imasked[4] ? 8'h60 : 8'h00;
- always @(negedge clk)
+ always @(posedge clk)
begin
if (wr && (addr == `ADDR_IF || addr == `ADDR_IE)) begin
case(addr)
addr == `ADDR_NR14 ? nr14 : 8'bzzzzzzzz
: 8'bzzzzzzzz;
- always @ (negedge core_clk) begin
+ always @ (posedge core_clk) begin
if(en && wr) begin
case(addr)
`ADDR_NR10: nr10 <= data;
addr == `ADDR_NR24 ? nr24 : 8'bzzzzzzzz
: 8'bzzzzzzzz;
- always @ (negedge core_clk) begin
+ always @ (posedge core_clk) begin
if(en && wr) begin
case(addr)
`ADDR_NR21: nr21 <= data;
addr == `ADDR_NR52 ? nr52 : 8'bzzzzzzzz
: 8'bzzzzzzzz;
- always @ (negedge core_clk) begin
+ always @ (posedge core_clk) begin
if(wr) begin
case(addr)
`ADDR_NR50: nr50 <= data;
reg [7:0] odata;
assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
- always @(negedge clk)
+ always @(posedge clk)
begin
if (decode) // This has to go this way. The only way XST knows how to do
begin // block ram is chip select, write enable, and always
reg [7:0] odata;
assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
- always @(negedge clk)
+ always @(posedge clk)
begin
if (decode) // This has to go this way. The only way XST knows how to do
begin // block ram is chip select, write enable, and always
reg [7:0] odata;
assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
- always @(negedge clk)
+ always @(posedge clk)
begin
if (decode && rd)
odata <= switches;
(clkdv[7:0] == 8'b0) :
0;
- always @ (negedge clk)
+ always @ (posedge clk)
begin
if(wr) begin
case(addr)
assign odata = have_data ? 8'b1 : 8'b0;
- always @ (negedge clk)
+ always @ (posedge clk)
begin
/* deal with diqing */
if(newdata) begin