Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CTU CAN FD IP Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canbus
CTU CAN FD IP Core
Commits
ff941cbf
Commit
ff941cbf
authored
Dec 10, 2018
by
Ille, Ondrej, Ing.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-factored busSync.
parent
3541a1a2
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
464 additions
and
199 deletions
+464
-199
src/Bus_Timing_Synchronisation/busSync.vhd
src/Bus_Timing_Synchronisation/busSync.vhd
+337
-181
src/CAN_top_level.vhd
src/CAN_top_level.vhd
+1
-0
src/Libraries/CANcomponents.vhd
src/Libraries/CANcomponents.vhd
+0
-13
src/Libraries/cmn_lib.vhd
src/Libraries/cmn_lib.vhd
+120
-0
src/common/majority_decoder_3.vhd
src/common/majority_decoder_3.vhd
+4
-3
src/common/rst_sync.vhd
src/common/rst_sync.vhd
+1
-1
src/common/sig_sync.vhd
src/common/sig_sync.vhd
+1
-1
No files found.
src/Bus_Timing_Synchronisation/busSync.vhd
View file @
ff941cbf
This diff is collapsed.
Click to expand it.
src/CAN_top_level.vhd
View file @
ff941cbf
...
...
@@ -80,6 +80,7 @@ USE IEEE.std_logic_1164.all;
USE
IEEE
.
numeric_std
.
ALL
;
USE
WORK
.
CANconstants
.
ALL
;
use
work
.
CANcomponents
.
ALL
;
use
work
.
cmn_lib
.
all
;
entity
CAN_top_level
is
generic
(
...
...
src/Libraries/CANcomponents.vhd
View file @
ff941cbf
...
...
@@ -855,19 +855,6 @@ package CANcomponents is
end
component
;
----------------------------------------------------------------------------
-- Asynchronous resset synchroniser
----------------------------------------------------------------------------
component
rst_sync
is
generic
(
constant
reset_polarity
:
std_logic
);
port
(
signal
clk
:
in
std_logic
;
signal
arst
:
in
std_logic
;
signal
rst
:
out
std_logic
);
----------------------------------------------------------------------------
-- APB Interface
----------------------------------------------------------------------------
...
...
src/Libraries/cmn_lib.vhd
0 → 100644
View file @
ff941cbf
--------------------------------------------------------------------------------
--
-- CTU CAN FD IP Core
-- Copyright (C) 2015-2018
--
-- Authors:
-- Ondrej Ille <ondrej.ille@gmail.com>
-- Martin Jerabek <martin.jerabek01@gmail.com>
--
-- Project advisors:
-- Jiri Novak <jnovak@fel.cvut.cz>
-- Pavel Pisa <pisa@cmp.felk.cvut.cz>
--
-- Department of Measurement (http://meas.fel.cvut.cz/)
-- Faculty of Electrical Engineering (http://www.fel.cvut.cz)
-- Czech Technical University (http://www.cvut.cz/)
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this VHDL component and associated documentation files (the "Component"),
-- to deal in the Component without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Component, and to permit persons to whom the
-- Component is furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Component.
--
-- THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE COMPONENT OR THE USE OR OTHER DEALINGS
-- IN THE COMPONENT.
--
-- The CAN protocol is developed by Robert Bosch GmbH and protected by patents.
-- Anybody who wants to implement this IP core on silicon has to obtain a CAN
-- protocol license from Bosch.
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Purpose:
-- Library with component declarations for common design entities.
--------------------------------------------------------------------------------
-- Revision History:
-- 10.12.2018 Created file
--------------------------------------------------------------------------------
Library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
package
cmn_lib
is
----------------------------------------------------------------------------
-- Reset synchronizer
----------------------------------------------------------------------------
component
rst_sync
is
generic
(
constant
reset_polarity
:
std_logic
);
port
(
signal
clk
:
in
std_logic
;
signal
arst
:
in
std_logic
;
signal
rst
:
out
std_logic
);
end
component
rst_sync
;
----------------------------------------------------------------------------
-- Signal synchroniser - synchronisation chain
----------------------------------------------------------------------------
component
sig_sync
is
generic
(
constant
timing_check
:
boolean
:
=
true
);
port
(
signal
clk
:
in
std_logic
;
signal
async
:
in
std_logic
;
signal
sync
:
out
std_logic
);
end
component
sig_sync
;
----------------------------------------------------------------------------
-- Shift register
----------------------------------------------------------------------------
component
shift_reg
is
generic
(
constant
reset_polarity
:
std_logic
;
constant
reset_value
:
std_logic_vector
;
constant
width
:
natural
;
constant
shift_down
:
boolean
);
port
(
signal
clk
:
in
std_logic
;
signal
res_n
:
in
std_logic
;
signal
input
:
in
std_logic
;
signal
preload
:
in
std_logic
;
signal
preload_val
:
in
std_logic_vector
(
width
-
1
downto
0
);
signal
enable
:
in
std_logic
;
signal
reg_stat
:
out
std_logic_vector
(
width
-
1
downto
0
);
signal
output
:
out
std_logic
);
end
component
shift_reg
;
----------------------------------------------------------------------------
-- Majority out of 3 decoder.
----------------------------------------------------------------------------
component
majority_decoder_3
is
port
(
signal
input
:
in
std_logic_vector
(
2
downto
0
);
signal
output
:
out
std_logic
);
end
component
majority_decoder_3
;
end
package
cmn_lib
;
src/common/majority_decoder_3.vhd
View file @
ff941cbf
...
...
@@ -53,11 +53,11 @@ use ieee.std_logic_1164.all;
entity
majority_decoder_3
is
port
(
signal
input
:
in
std_logic_vector
(
2
downto
0
);
signal
output
:
in
std_logic
signal
output
:
out
std_logic
);
end
majority_decoder_3
;
architecture
rtl
of
majority_decoder
is
architecture
rtl
of
majority_decoder
_3
is
begin
with
input
select
output
<=
...
...
@@ -68,6 +68,7 @@ begin
'0'
when
"100"
,
'1'
when
"101"
,
'1'
when
"110"
,
'1'
when
"111"
;
'1'
when
"111"
,
'X'
when
others
;
end
rtl
;
src/common/rst_sync.vhd
View file @
ff941cbf
...
...
@@ -70,7 +70,7 @@ architecture rtl of rst_sync is
begin
-- Reset synchroniser process
rst_sync_proc
:
process
(
clk
,
arst
_n
)
rst_sync_proc
:
process
(
clk
,
arst
)
begin
if
(
arst
=
reset_polarity
)
then
rff
<=
reset_polarity
;
...
...
src/common/sig_sync.vhd
View file @
ff941cbf
...
...
@@ -61,7 +61,7 @@ entity sig_sync is
);
end
sig_sync
;
architecture
rtl
of
rst
_sync
is
architecture
rtl
of
sig
_sync
is
-- Synchroniser registers
signal
rff
:
std_logic
;
...
...
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