Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
TDC core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
TDC core
Commits
6af2b4a1
Commit
6af2b4a1
authored
Aug 03, 2011
by
Sebastien Bourdeauducq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style
parent
1def05a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
tb_lbc.vhd
tb/lbc/tb_lbc.vhd
+11
-8
No files found.
tb/lbc/tb_lbc.vhd
View file @
6af2b4a1
...
...
@@ -15,6 +15,8 @@
-- 2011-08-03 SB Created file
-------------------------------------------------------------------------------
-- Copyright (C) 2011 Sebastien Bourdeauducq
library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
use
ieee
.
numeric_std
.
all
;
...
...
@@ -22,14 +24,14 @@ use ieee.math_real.all;
entity
tb_lbc
is
generic
(
g_N
:
positive
:
=
5
g_N
:
positive
:
=
6
);
end
entity
;
architecture
tb
of
tb_lbc
is
function
chr
(
sl
:
std_logic
)
return
character
is
variable
c
:
character
;
variable
c
:
character
;
begin
case
sl
is
when
'U'
=>
c
:
=
'U'
;
...
...
@@ -73,7 +75,8 @@ begin
);
polarity
<=
'0'
;
process
variable
seed1
,
seed2
:
positive
;
variable
seed1
:
positive
:
=
1
;
variable
seed2
:
positive
:
=
2
;
variable
rand
:
real
;
variable
int_rand
:
integer
;
variable
stim
:
std_logic_vector
(
0
downto
0
);
...
...
@@ -94,7 +97,7 @@ begin
end
loop
;
-- generate, print and verify output
wait
for
10
ns
;
report
"Vector:"
&
str
(
d
)
&
" Expected:"
&
integer
'image
(
i
)
&
" Result:"
&
integer
'image
(
to_integer
(
unsigned
(
count
)));
report
"Vector:"
&
str
(
d
)
&
" Expected:"
&
integer
'image
(
i
)
&
" Result:"
&
integer
'image
(
to_integer
(
unsigned
(
count
)));
assert
i
=
to_integer
(
unsigned
(
count
))
severity
failure
;
end
loop
;
report
"Test passed."
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment