OpenCores
URL https://opencores.org/ocsvn/single_port/single_port/trunk

Subversion Repositories single_port

[/] [single_port/] [trunk/] [VHDL/] [single_port_pkg.vhd] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rpaley_yid
-- $Author: rpaley_yid $
2
-- $Date: 2003-01-14 21:48:11 $
3
-- $Header: /home/marcus/revision_ctrl_test/oc_cvs/cvs/single_port/VHDL/single_port_pkg.vhd,v 1.1.1.1 2003-01-14 21:48:11 rpaley_yid Exp $
4
-- $Locker:  $
5
-- $Revision: 1.1.1.1 $
6
-- $State: Exp $
7
 
8
-- --------------------------------------------------------------------------
9
-- 
10
-- Purpose: Package file for single_port memory and testbench
11
-- 
12
-- References: 
13
--   1. The Designer's Guide to VHDL by Peter Ashenden
14
--      ISBN: 1-55860-270-4 (pbk.)
15
--   2. Writing Testbenches - Functional Verification of HDL models by 
16
--      Janick Bergeron | ISBN: 0-7923-7766-4
17
--
18
-- Notes: 
19
--
20
-- --------------------------------------------------------------------------
21
 
22
LIBRARY IEEE;
23
USE IEEE.STD_LOGIC_1164.ALL;
24
USE IEEE.NUMERIC_STD.ALL;
25
 
26
PACKAGE single_port_pkg IS
27
CONSTANT PAGEDEPTH : INTEGER := 256; -- memory page depth
28
CONSTANT PAGENUM : INTEGER := 4096; -- number of pages in memory.
29
CONSTANT DATA_WIDTH : INTEGER := 32; -- memory data bus width
30
CONSTANT ADDRESS_WIDTH : INTEGER := 16; -- memory address bus width
31
-- Data bus type for memory interface
32
SUBTYPE data_inter_typ IS STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
33
-- Data bus type for internal memory 
34
SUBTYPE data_typ IS BIT_VECTOR(DATA_WIDTH-1 DOWNTO 0);
35
-- Address bus type for memory interface
36
SUBTYPE addr_inter_typ IS STD_LOGIC_VECTOR(ADDRESS_WIDTH-1 DOWNTO 0);
37
-- Address bus type for internal memory
38
SUBTYPE addr_typ IS NATURAL;
39
-- Operations testbench can do.
40
TYPE do_typ IS ( init , read , write , dealloc , end_test );
41
 
42
TYPE to_srv_typ IS RECORD -- Record passed from test case to test bench
43
  do   : do_typ;
44
  addr : addr_inter_typ;
45
  data : data_inter_typ;
46
  event : BOOLEAN;
47
END RECORD to_srv_typ;
48
 
49
TYPE frm_srv_typ IS RECORD -- Record passed from test bench to test case
50
  data : data_inter_typ;
51
  event : BOOLEAN;
52
END RECORD frm_srv_typ;
53
 
54
 
55
END PACKAGE single_port_pkg;
56
 
57
PACKAGE BODY single_port_pkg IS
58
 
59
END PACKAGE BODY single_port_pkg;
60
 
61
-- $Log: not supported by cvs2svn $
62
-- Revision 1.1  2003/01/14 17:48:44  Default
63
-- Initial revision
64
--
65
-- Revision 1.1  2002/12/24 17:58:49  Default
66
-- Initial revision
67
--
68
 
69
 
70
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.