-
Notifications
You must be signed in to change notification settings - Fork 0
/
MemoryUnitUtils.v
33 lines (31 loc) · 1002 Bytes
/
MemoryUnitUtils.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*-- *******************************************************
-- Computer Architecture Course, Laboratory Sources
-- Amirkabir University of Technology (Tehran Polytechnic)
-- Department of Computer Engineering (CE-AUT)
-- https://ce[dot]aut[dot]ac[dot]ir
-- *******************************************************
-- All Rights reserved (C) 2019-2020
-- *******************************************************
-- Student ID :
-- Student Name:
-- Student Mail:
-- *******************************************************
-- Additional Comments:
--
--*/
/*-----------------------------------------------------------
--- Module Name: Memory Unit Utils
--- Description: Module5:
-----------------------------------------------------------*/
`timescale 1 ns/1 ns
module register(input D, input Clk,
input reset, input load, output reg Q);
always @(posedge Clk or negedge reset)
if (~reset)
begin
Q <= 1'b0;
end else if (load)
begin
Q <= D;
end
endmodule