Minor changes to CPU

This commit is contained in:
Johannes
2019-03-16 14:55:37 -04:00
parent fa5caec5dd
commit e8554a5a9a
3 changed files with 4 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ module CPU9bits(
.clk(clk),
.writeEnable(loadS),
.writeData(op0),
.address(AluOut),
.address(op1),
.readData(dataMemOut)
);

View File

@@ -27,10 +27,10 @@ module dataMemory(
memory[15] <= 9'b000000000;
end
always@(address, posedge clk)begin
always@(address)begin
if(clk == 1'b1)begin
readData <= memory[address];
if(writeEnable == 1'b1)begin
if(writeEnable == 1'b0)begin
memory[address] <= writeData;
end
else begin

View File

@@ -19,7 +19,7 @@ module instructionMemory(
end
always@(address, posedge clk)begin
always@(address)begin
readData <= memory[address];
end
endmodule