-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About the DIV_xx_x parameter #1
Comments
The theoretical minimum multiplier for oversampling is 3. (The DIV is counted from 0, so the minimal DIV value is 2.) The following explains why oversampling is not feasible for 2. The waveform above is the 2x rising edge sampling clock, and the waveform below is the UART rx data:
If s2 is sampled to 0, then s3 is used as the middle to get the correct data. To achieve 3x oversampling, the logic is more complex than higher oversampling, and requires careful tuning of the data synchronization between modules. sync_3x and INIT_VAL are both for adjusting the phase. |
Thank you for your reply. |
The total output data has three states: Strong 0, Strong 1 and Weak 1. The tx_pre_len corresponds to strong 1 output, while strong 1 output is not allowed in arbitration phase, so there is no tx_pre_len in arbitration mode. If there is no tx_pre_len when outputting data, there will be a delay in the beginning of the output data after it passes through the 485 interface chip:
(Because the time required to enable the output of the 485 chip is much longer than the delay in data transfer. The specific time lengths can be found in the corresponding 485 chip manuals.) This delay can cause problems in high-speed communication, but the rate of arbitration stage is usually not more than 1Mbps, so it does not cause problems. |
When reach_max_idle ,BS mode will send a break character, why this character does not need tx_pre_len? Will the delay cause the receiver got a wrong break character (be less than 10 bits) ? |
Because there may be multiple nodes sending the break character at the same time. Similar to arbitration mode, strong 1 data is not allowed to be sent in case of possible data collisions, so tx_pre_len is not used. The received data may be shorter than 10 bits, but this will not cause problems. This is because the purpose of sending the break character is to put the bus into a non-idle state. |
Wyh " the rate of arbitration stage is usually not more than 1Mbps"? Is there something wrong when the arbitration rate > 1Mbps? |
|
@dukelec Thanks for your reply. One more question,in the file "tests", why did you add the logic codes(as follows) in module cdbus_wrapper_dft.v? And If I delete the code, the simulation test fails.
|
This piece of code is used to simulate the 485 interface circuit and the state of the 485 bus. A single wire, bus_a, is used here to represent the current state of the 485 bus. In typical 485 circuits, the /RE and DE pins are usually controlled together, so that when transmitting, the receiving function is disabled. However, we only need to fix the /RE pin to a low level and control only the DE pin. This way, 'RX=TX' can be achieved during the transmission phase. You can check the wiring method of the 485 transceiver on the right side of the Block Diagram in the Readme. |
Is there any way to reduce the minimum value of parameter DIV_xx_x from 2 to 1?
I try to figure it out, but there still some confused questions like :
Why the minimum value of parameter DIV_xx_x is 2?
What the INIT_VAL means in cd_baud_rate module?To adjust the phase ?
Blessing!
The text was updated successfully, but these errors were encountered: