Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
progkrets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Solveig Langbakk
progkrets
Commits
58cb7267
Commit
58cb7267
authored
7 months ago
by
Solveig Langbakk
Browse files
Options
Downloads
Patches
Plain Diff
trekker ut funksjoner
parent
b371ddaa
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller.vhd
+25
-3
25 additions, 3 deletions
controller.vhd
with
25 additions
and
3 deletions
controller.vhd
+
25
−
3
View file @
58cb7267
...
...
@@ -65,6 +65,25 @@ architecture RTL of Controller is
end
if
;
end
function
statusCheck
;
function
getStatusFromRx
(
databus
:
std_logic_vector
(
7
downto
0
))
return
std_logic
is
begin
Rd_sig
<=
'1'
;
adress
<=
"101"
;
end
function
getStatusFromRx
;
function
sendDataToTx
(
databus
:
std_logic_vector
(
7
downto
0
))
return
std_logic
is
begin
if
txBusy
=
'0'
then
adress
<=
"001"
;
Data_bus
<=
databus
;
Wr_sig
<=
'1'
;
else
Rd_sig
<=
'1'
;
Data_bus
<=
databus
;
end
if
;
end
function
sendDataToTx
;
--Arkitekturen begynner
begin
...
...
@@ -104,19 +123,22 @@ begin
statusChecker
(
turnTaker
);
if
Data_bus
=
"ZZZZZZZZ"
then
--do nothing
Rd_sig
<=
'0'
;
else
if
Rd_sig
=
'1'
then
sendDataToTx
(
Data_bus
);
else
if
turnTaker
=
'1'
then
-- da skal vi sjekke om TX er busy
if
Data_bus
(
0
downto
0
)
=
"1"
then
txBusy
<=
'1'
;
elsif
turnTaker
=
'0'
then
-- Skal sjekke om Rx har data til oss, status på fifo osv.
--if Data_bus()
getStatusFromRx
(
Data_bus
);
else
end
if
;
end
if
;
end
if
;
end
if
;
--
end if;
end
if
;
end
process
p_clk
;
...
...
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