forked from deoregaurav92/SystemVerilog_Coding_Practice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
top_lab7.sv
33 lines (26 loc) · 923 Bytes
/
top_lab7.sv
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
///////////////////////////////////////////////////////////////////////////
// (c) Copyright 2013 Cadence Design Systems, Inc. All Rights Reserved.
//
// File name : top.sv
// Title : top module for Memory labs
// Project : SystemVerilog Training
// Created : 2013-4-8
// Description : Defines the top module for memory labs
// Notes :
// Memory Lab - top-level
// A top-level module which instantiates the memory and mem_test modules
//
///////////////////////////////////////////////////////////////////////////
module top_lab7;
// SYSTEMVERILOG: timeunit and timeprecision specification
timeunit 1ns;
timeprecision 1ns;
// SYSTEMVERILOG: logic and bit data types
logic clk = 0;
always #5 clk = ~clk;
mem_inf mbus (clk);
// SYSTEMVERILOG:: implicit .* port connections
mem_test mtest (.mbus(mbus.tb));
// SYSTEMVERILOG:: implicit .name port connections
mem m1 (.mbus(mbus.mem));
endmodule