当前位置:网站首页>Introduction to TTCAN brick moving
Introduction to TTCAN brick moving
2022-06-27 15:24:00 【Akangya】
1、 Introduce
standard ,ISO/WD11898-4“ Road vehicle controller area network (CAN) The fourth part : Time triggered communication ,“ Difficult to read and understand , Because it is a standard specific type of scheduling message , A local clock and global time , All nodes are in one or more CAN The Internet . I will try to explain this standard in a simple way , Start with the clock , Then move to the time trigger , Finally, the guiding rules of scheduling are discussed . For those familiar with CanKingdom For people who , The most important task is to understand the clock , Because it's in CanKingdom Basic features used in the system . I am right. TTCAN The description of may give the impression that , That is, it describes how to implement it in silicon . However , This may not be the case , Because complex standards can be described in different ways , This leads to different architectures , All of these will produce the same result . I hope my comments can give some ideas to silicon designers , Make it a coverage ratio TTCAN The realization of a broader market .
2、 Time
TTCAN The concept of time in is a linear finite time . The time master node periodically transmits synchronization messages or transmits synchronization messages in events , All nodes use this message to calculate the time slots for transmitting and receiving messages . The public time starts with the synchronization message , At the end of the last time slot .TTCAN There are two levels :
1 level , The clock in each node runs independently , By the bit time clock on the bus .
2 level , The clock in each node is connected with TM Clock synchronization , A time unit is a 1 Programmable fraction of seconds . The common time here is called “ Global time ”
Although according to the standard , Time is linear and finite , But any support TTCAN level 2 All chips will be able to maintain a cycle time
TTCAN The time in is in NTUs( Network time unit ) Measure in units .NTU The nominal value of is programmable , But the real value is kept by the time master program . The time master transmits the value of his clock in a time message , It is called reference message in the standard , The value of the time master clock starts at the frame of the time message (SOF) Bit is captured at the sampling point .
As shown in the figure, the value of the clock is captured at the sampling point of the time message

Each node captures the reference message at its sampling point SOF Local time at bit . It should be noted that , Their capture time is later than the main capture time , This depends on the propagation delay and their bit timing register settings . However , This delay can be considered static , And handled by the application .TTCAN The standard ignores this delay .
3、TTCAN The clock
3.1 summary
TTCAN Standards are written for specific types of schedules and specific types of implementations . In order to use this concept more widely , It's better to see TTCAN, The clock is in the center , And support hardware and software around it . chart 2 It shows the basic features of a clock to support the standard .
The heart is an oscillator and a counter , It can be adjusted to the global time . There are two ways to synchronize the local time to the global time : Either the local time source adjusts the phase and value of the global time or the local time is kept and any referenced global time is recalculated before use . chart 2 Medium “ Global time correction ” These two methods .
Associated with the time counter is a capture register . This captures each SOF Counter value of the sampling point of , And make the captured value available to the timestamp unit . This unit adds the receive time as additional bytes to each received message . Even the transmitted information will be received by the transmitter . It can also capture counter values for external events , And make these values available to applications .
The message building unit adds the captured time value of the selected transmission message as the first byte in the data field of the identical message .
With each transmitted or received CANId Associated with this is a time window . For transmission messages , The transmission enabling unit controls the transmission function . When the time counter reaches “ open ” When the value of , It will enable the transmission of messages , And when the time counter reaches “ close ” When the value of , It will disable the transport
3.2 Level 1
TTCAN1 The stage clock is at least one 16 Bit counter counter . Time is linear , The first epoch starts from zero , The reference message period is 0. A new period starts from the beginning of the next reference message . The length of one epoch is controlled by the time master by transmitting a reference message to start the next epoch . This standard allows for a new era 1 Before , Set up 1、2、4、8、16、32 or 64 Times . therefore , Time requires two counters , An epoch counter and a “ Epoch time ” Counter . An era is called... In the standard “ The basic cycle ”.
3.3 Level 2
TTCAN2 The stage clock is at least one 19 Bit counter , The three least significant bits represent NTU Part of . This standard allows for additional 6 The most important bits and the other 4 The most important bit , With a 29 Bit counter end . The optional six most important bits are programmable , To set the surround of the counter .

3.4 Scheduling primitives
With each plan envelope (CANId) Associated are two mask filters that work on the clock . They can be programmed bit by bit 0、1, Or not at all . These masks only include the... Of the clock NTU The counting part . They merge together , A time window will be formed when messages are allowed to be transmitted or expected to be received .
For transmission messages , One is in CC Trigger the transmission enable bit in , The other is to disable the same bit . For a receive window , dependent CANId Can be programmed to “ Don't care , Accept any message . The time window of the transmission message is related to the occurrence of the start character of the frame . The transmission of messages is allowed to start during the time window , namely , If SOF Appears on or after the opening time , But before the closing time , Is considered correct . If SOF Appears on or after the opening time , And the receiving is completed before the closing time , Including local acceptance filtering , It is considered that the message received is correct . therefore , For the same message , The transmission and reception time windows are different .
The external event unit captures the time when an external event occurs . In addition to timestamp Events , This function can also be used to set the offset of message scheduling by adding the captured time to the time window .
3.5 Clock synchronization message
TTCAN There are the following rules for time messages :
1 Time message sending form time master [TM]
2 Yes 8 level TMTTCAN System
3 Specific can Id, Three lowest positions 000, Used for time messages from the highest priority TM And low priority TM Use the following to Id The priority of the
therefore ,TM Sync message ( Refer to the message ) Be linked to a specific CAN identifier . Next 7 individual CAN The ID card is reserved for potential time masters . Anyone who receives these seven id One of the TTCAN The chip will regard this message as a valid reference message .
The format of the reference information is as follows :
If the reference message is disturbed during transmission , It should be updated and retransmitted immediately .( notes : This program is absolutely unacceptable in most timing scheduling systems !)
Last continuous time message bit L Indicates that this is the last time message in a linear global time , And the next time message will be the beginning of a new era . To achieve a cycle time , Never set L.L stay TTCAN The standard is called Next_is_Gap.
If TM An offset change is made in the global time , But there is no phase adjustment , No right NTU Any correction to the length of , Then set the global time discontinuity bit D. According to the standard ,D The bit setting must not have two consecutive time messages . However , There is no fault procedure defined for this function , I doubt the value of this mechanism .
3.6 Clock summary
We have now passed CAN The clock of the controller , It provides the following functions :
1. A counter , Minimum 16 position , It has selectable programmable important bits and selectable unimportant bits , Connect to the oscillator .
2. A capture register , from SOF Sampling points and external and temporal events trigger .
3. A time mask , stay CC The transmission enable bit is set on the .
4. A time mask , stay CC Set the transmit enable bit on passive .
5. A time mask , An event is generated when the clock reaches the matching value .
6. A storage for received messages
7 Time capture device . A device that adds the captured time to the first byte in the data field of the selected transmission message .
8. A device that adjusts the local time to the global time by a message received from the time master server .
9. An application monitor
4、 Dispatching assistance
We now have a clock with some basic features , We need a protocol engine to meet TTCAN standard .
The protocol engine has some visible interfaces .TTCAN The standard has specified a set of suitable TTCAN Planned mandatory interfaces . Some of them are very generic , Others are highly specific to matrix schedules , But there are also some deficiencies , It would be nice to see .
边栏推荐
- 初识云原生安全:云时代的最佳保障
- Programming skills: script scheduling
- 我想買固收+產品,但是不了解它主要投資哪些方面,有人知道嗎?
- Lei Jun lost another great general, and liweixing, the founding employee of Xiaomi No. 12, left his post. He once had porridge to create Xiaomi; Intel's $5.4 billion acquisition of tower semiconductor
- [WUSTCTF2020]girlfriend
- AI begets the moon, and thousands of miles share the literary heart
- Li Kou's 81st biweekly match
- 漏洞复现----34、yapi 远程命令执行漏洞
- Redis master-slave replication, sentinel mode, cluster cluster
- [xman2018 qualifying] pass
猜你喜欢
随机推荐
Make a ThreadLocal (source code) that everyone can understand
Privacy computing fat offline prediction
CV领域一代宗师黄煦涛教授86岁冥诞,UIUC专设博士奖学金激励新锐
Design and implementation of food recipe and ingredients website based on vue+node+mysql
巧用redis实现点赞功能,它不比mysql香吗?
R language objects are stored in JSON
How to change a matrix into a triple in R language (i.e. three columns: row, col, value)
Pycharm安装与设置
Experience sharing of mathematical modeling: comparison between China and USA / reference for topic selection / common skills
PR second training notes
AQS Abstract queue synchronizer
Maximum profit of stock (offer 63)
AQS抽象队列同步器
Reflection learning summary
隱私計算FATE-離線預測
Teach you how to package and release the mofish Library
Talk about redis transactions
Excuse me, is it cost-effective to insure sunshine Optimus Prime term life insurance No. 7? What are the advantages of this product?
At a time of oversupply of chips, China, the largest importer, continued to reduce imports, and the United States panicked
基于SSM的Web网页聊天室系统





![[an Xun cup 2019]attack](/img/1a/3e82a54cfcb90ebafebeaa8ee1ec01.png)


