File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 23
23
-- 06/2015: 2015.06 Updated for Alerts, ...
24
24
-- Numerous revisions for VHDL Testbenches and Verification
25
25
-- 01/2016: 2016.01 Update for buf.all(buf'left)
26
+ -- 11/2016: 2016.11 Refinement to MemRead to return value, X (if X), U (if not initialized)
26
27
--
27
28
--
28
29
-- Copyright (c) 2005 - 2016 by SynthWorks Design Inc. All rights reserved.
@@ -257,13 +258,17 @@ package body MemoryPkg is
257
258
-- Address of a word within a block
258
259
WordAddr := to_integer (aAddr(BlockkWidthVar - 1 downto 0 )) ;
259
260
260
- -- X in Word, return all X
261
- if (ArrayPtrVar(BlockAddr)(WordAddr) < 0 ) then
261
+ if ArrayPtrVar(BlockAddr)(WordAddr) >= 0 then
262
+ -- Get the Word from the Array
263
+ Data := to_slv(ArrayPtrVar(BlockAddr)(WordAddr), Data'length ) ;
264
+
265
+ elsif ArrayPtrVar(BlockAddr)(WordAddr) = - 1 then
266
+ -- X in Word, return all X
262
267
Data := (Data'range => 'X' ) ;
263
-
264
- -- Get the Word from the Array
268
+
265
269
else
266
- Data := to_slv(ArrayPtrVar(BlockAddr)(WordAddr), Data'length ) ;
270
+ -- Location Uninitialized, return all X
271
+ Data := (Data'range => 'U' ) ;
267
272
268
273
end if ;
269
274
end procedure MemRead ;
You can’t perform that action at this time.
0 commit comments