Commit 3a979be3 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

doc: Update prescaler documenatation.

parent e9635c0a
Pipeline #6735 failed with stage
in 42 seconds
......@@ -533,7 +533,7 @@ Ille Ondrej, Martin Jeřábek
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="4">
<lyxtabular version="3" rows="9" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="1.5cm">
<column alignment="center" valignment="top" width="2cm">
......@@ -812,13 +812,51 @@ Added CRC Wrapper.
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2.1.3
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Ondrej Ille
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
01-2019
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Added TIMESTAMP_LOW, TIMESTAMP_HIGH registers.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
2.1.4
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
......@@ -834,7 +872,7 @@ Ondrej Ille
\begin_inset Text
\begin_layout Plain Layout
01-2019
03-2019
\end_layout
\end_inset
......@@ -843,7 +881,7 @@ Ondrej Ille
\begin_inset Text
\begin_layout Plain Layout
Added TIMESTAMP_LOW, TIMESTAMP_HIGH registers.
Re-worked Prescaler.
\end_layout
\end_inset
......@@ -11095,59 +11133,48 @@ name "fig:INT-manager-block"
\begin_layout Subsection
Prescaler
\begin_inset CommandInset ref
LatexCommand ref
reference "subsec-Operation-control"
plural "false"
caps "false"
noprefix "false"
\end_inset
\end_layout
\begin_layout Description
File prescaler.vhd
\begin_layout Standard
Prescaler handles following functions:
\end_layout
\begin_layout Description
Used
\begin_inset space ~
\end_inset
in can_top_level.vhd
\end_layout
\begin_layout Itemize
\begin_layout Description
Entity
\family roman
\shape italic
prescaler
\shape smallcaps
Time Quanta
\shape default
counting.
\end_layout
\begin_layout Standard
Prescaler implements functionality of CAN
\begin_layout Itemize
Bit Time counting (
\shape smallcaps
Bus Timing
Synchronisation Segment, Propagation Segment, Phase 1 Segment, Phase 2 Segment).
\shape default
and its block diagram is shown in
\begin_inset ERT
status open
\begin_layout Plain Layout
Prescaler treats Bit time segments as TSEG1 and TSEG2.
\end_layout
\begin_layout Itemize
\backslash
hyperref[fig:prescaler-block-diagram]{Figure }
\shape smallcaps
Hard Synchronisation, Resynchronisation.
\end_layout
\end_inset
\begin_layout Itemize
Proper duration of Bits where Bit rate is switched.
\end_layout
\begin_layout Itemize
Generation of Triggering signals for TX and RX Datapath.
\end_layout
\begin_layout Standard
Generic configuration parameters are shown in Table
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:prescaler-block-diagram"
reference "tab:Prescaler-generics"
plural "false"
caps "false"
noprefix "false"
......@@ -11155,96 +11182,22 @@ noprefix "false"
\end_inset
.
Elementary time interval on CAN Bus is
\shape smallcaps
Time Quant
\shape default
um.
Firstly, proper
\shape smallcaps
Time Quantum
\shape default
duration (
\family roman
\shape italic
tq_m
\family default
\shape default
) is multiplexed by Sample Control (
\family roman
\shape italic
sp_control
\family default
\shape default
) from
\shape smallcaps
Nominal Bit-rate
\shape default
\shape smallcaps
Time Quantum
\shape default
(
\family roman
\shape italic
tq_nbt
\family default
\shape default
) and
\shape smallcaps
Data Bit-Rate Time Quantum
\shape default
(
\family roman
\shape italic
tq_dbt
\family default
\shape default
).
\shape smallcaps
Time Quantum
\shape default
is measured via Time Quantum Counter (
\family roman
\shape italic
tq_counter
\family default
\shape default
) and start of new
\shape smallcaps
Time Quantum
\shape default
is signaled via
\family roman
\shape italic
tq_edge
\family default
\shape default
signal.
Additional clock signal outputs with frequency matching
\shape smallcaps
Bit-Rate
\shape default
are provided in
\family roman
\shape italic
clk_tq_nbt
\family default
\shape default
,
\family roman
\shape italic
clk_tq_dbt
\family default
\shape default
Interface list is shown in Table
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:Prescaler-Interface"
plural "false"
caps "false"
noprefix "false"
\end_inset
.
\end_layout
\begin_layout Standard
\begin_inset Float figure
placement H
\begin_inset Float table
placement h
wide false
sideways false
status open
......@@ -11252,523 +11205,1748 @@ status open
\begin_layout Plain Layout
\noindent
\align center
\begin_inset Graphics
filename ../pics/Visio_generated/Prescaler_Block_Diagram.pdf
lyxscale 20
scale 70
\begin_inset Tabular
<lyxtabular version="3" rows="16" columns="4">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="10cm">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\end_inset
\begin_layout Plain Layout
Name
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Type
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Prescaler block diagram
\begin_inset CommandInset label
LatexCommand label
name "fig:prescaler-block-diagram"
Default
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Description
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
reset_polarity
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
std_logic
\end_layout
\begin_layout Standard
\shape smallcaps
Bit Time
\shape default
behavior is controlled by Bit Time FSM whose state transition diagram is
shown in
\begin_inset ERT
status open
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
'0'
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\backslash
hyperref[fig:Bit-Time-FSM]{Figure }
\begin_layout Plain Layout
Active value of reset signal
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:Bit-Time-FSM"
plural "false"
caps "false"
noprefix "false"
\shape italic
capt_btr
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
boolean
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
false
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Insert Capture register for Baud rate prescaler.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
.
Each segment of
\shape smallcaps
Bit Time
\shape default
is handled by a separate state (
\family roman
\shape italic
sync
\family default
\shape default
,
\family roman
\shape italic
prop
\family default
\shape default
,
\family roman
\shape italic
ph1
\family default
\shape default
,
\family roman
\shape italic
ph2
\family default
\shape default
).
Additional state, which is a substitute for
\family roman
capt_tseg1
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
boolean
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
true
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Insert Capture register for Time segment 1.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
sync
\family default
\shape default
,
\family roman
capt_tseg2
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
boolean
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
false
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Insert Capture register for Time segment 2.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
ph1
\family default
\shape default
and
\family roman
capt_sjw
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
boolean
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
false
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Insert Capture register for SJW.
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
ph2
\family default
\shape default
in case of
\shape smallcaps
Hard Synchronization
\shape default
is
\family roman
tseg1_nbt_width
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
natural
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
8
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Internal width of Time segment 1 (Nominal).
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
h_sync
\family default
\shape default
.
Duration of each state is controlled by Bit Time Counter (
\family roman
tseg2_nbt_width
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
natural
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
6
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Internal width of Time segment 2 (Nominal).
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\shape italic
bt_counter
\family default
\shape default
) which is directly set inside Bit Time FSM.
Bit Time Counter is compared with real duration of
\shape smallcaps
Phase 1
\shape default
and
\shape smallcaps
Phase 2
\shape default
registers (
\family roman
tq_nbt_width
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
natural
\end_layout