Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Can
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minyong Li
Can
Commits
91d71c41
Verified
Commit
91d71c41
authored
3 years ago
by
Minyong Li
Browse files
Options
Downloads
Patches
Plain Diff
testbench/CanCore.tb.v: add testbench for CanCore
parent
25097ed0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testbench/CanCore.tb.v
+50
-0
50 additions, 0 deletions
testbench/CanCore.tb.v
with
50 additions
and
0 deletions
testbench/CanCore.tb.v
0 → 100644
+
50
−
0
View file @
91d71c41
// Testbench for core.CanCore
// SPDX-FileCopyrightText: 2021 Minyong Li <ml10g20@soton.ac.uk>
// SPDX-License-Identifier: GPL-3.0-or-later
`timescale
100
ps
/
1
ps
module
CanCoreTest
;
reg
clock
;
reg
reset
;
reg
io_take
;
wire
io_halted
;
reg
[
6
:
0
]
io_programMemory_read_addr
;
wire
[
19
:
0
]
io_programMemory_read_data
;
reg
io_programMemory_write_en
;
reg
[
6
:
0
]
io_programMemory_write_addr
;
reg
[
19
:
0
]
io_programMemory_write_data
;
reg
[
3
:
0
]
io_dataMemory_read_addr
;
wire
[
511
:
0
]
io_dataMemory_read_data
;
reg
io_dataMemory_write_en
;
reg
[
3
:
0
]
io_dataMemory_write_addr
;
reg
[
511
:
0
]
io_dataMemory_write_data
;
CanCore
canCore
(.
*
);
always
#
1
clock
=
~
clock
;
initial
begin
clock
<=
0
;
reset
<=
1
;
io_take
<=
0
;
io_programMemory_read_addr
<=
0
;
io_programMemory_write_addr
<=
0
;
io_programMemory_write_en
<=
0
;
io_programMemory_write_addr
<=
0
;
io_programMemory_write_data
<=
0
;
io_dataMemory_read_addr
<=
0
;
io_dataMemory_write_en
<=
0
;
io_dataMemory_write_addr
<=
0
;
io_dataMemory_write_data
<=
0
;
// Quartus Prime starts the simulator under
// fpga/<board>/simulation/<simulator>/ ; change the path if needed.
$
readmemh
(
"../../../../firmware/test/test.prog.hex"
,
canCore
.
programMemory
.
mem
);
$
readmemh
(
"../../../../firmware/test/test.data.hex"
,
canCore
.
dataMemory
.
mem
);
$
stop
;
end
endmodule
This diff is collapsed.
Click to expand it.
Minyong Li
@ml10g20
mentioned in commit
ac7c2585
·
3 years ago
mentioned in commit
ac7c2585
mentioned in commit ac7c25857520dc203095ee850fe958626557926d
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment