Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SLDMA-350 Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SoCLabs
SLDMA-350 Tech
Commits
b14e8426
Commit
b14e8426
authored
1 year ago
by
Daniel Newbrook
Browse files
Options
Downloads
Patches
Plain Diff
Add edge detection for trig converter
parent
6ae92150
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrapper/logical/sldma350_trig_converter.v
+18
-1
18 additions, 1 deletion
wrapper/logical/sldma350_trig_converter.v
with
18 additions
and
1 deletion
wrapper/logical/sldma350_trig_converter.v
+
18
−
1
View file @
b14e8426
...
...
@@ -37,11 +37,28 @@ assign DMAC_DMA_REQ_ERR = dma_err;
assign
trig_in_req_type
=
2'b10
;
assign
DMAC_DMA_DONE
=
out_ack
;
reg
req_0
;
reg
req_1
;
reg
DMAC_DMA_REQ_EDGE
;
always
@
(
posedge
clk
)
begin
req_0
<=
DMAC_DMA_REQ
;
req_1
<=
req_0
;
if
(
req_0
&~
req_1
)
begin
DMAC_DMA_REQ_EDGE
<=
1'b1
;
end
else
begin
DMAC_DMA_REQ_EDGE
<=
1'b0
;
end
end
always
@
(
negedge
resetn
or
posedge
clk
)
begin
if
(
~
resetn
)
begin
state
<=
IDLE
;
dma_err
<=
1'b0
;
out_ack
<=
1'b0
;
req_0
<=
1'b0
;
req_1
<=
1'b0
;
DMAC_DMA_REQ_EDGE
<=
1'b0
;
end
else
begin
state
<=
next_state
;
end
...
...
@@ -59,7 +76,7 @@ always @* begin
case
(
state
)
IDLE:
begin
trig_req
=
1'b0
;
if
(
DMAC_DMA_REQ
)
begin
if
(
DMAC_DMA_REQ
_EDGE
&
~
trig_in_ack
)
begin
req_err
=
1'b0
;
next_state
=
START_REQ
;
end
...
...
This diff is collapsed.
Click to expand it.
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