URL
https://opencores.org/ocsvn/can/can/trunk
[/] [can/] [tags/] [rel_6/] [rtl/] [verilog/] [can_bsp.v] - Diff between revs 44 and 45
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 44 |
Rev 45 |
Line 48... |
Line 48... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.26 2003/02/19 23:21:54 mohor
|
|
// When bit error occured while active error flag was transmitted, counter was
|
|
// not incremented.
|
|
//
|
// Revision 1.25 2003/02/19 14:44:03 mohor
|
// Revision 1.25 2003/02/19 14:44:03 mohor
|
// CAN core finished. Host interface added. Registers finished.
|
// CAN core finished. Host interface added. Registers finished.
|
// Synchronization to the wishbone finished.
|
// Synchronization to the wishbone finished.
|
//
|
//
|
// Revision 1.24 2003/02/18 00:10:15 mohor
|
// Revision 1.24 2003/02/18 00:10:15 mohor
|
Line 389... |
Line 393... |
reg rx_crc_lim;
|
reg rx_crc_lim;
|
reg rx_ack;
|
reg rx_ack;
|
reg rx_ack_lim;
|
reg rx_ack_lim;
|
reg rx_eof;
|
reg rx_eof;
|
reg rx_inter;
|
reg rx_inter;
|
|
reg go_early_tx_latched;
|
|
|
reg rtr1;
|
reg rtr1;
|
reg ide;
|
reg ide;
|
reg rtr2;
|
reg rtr2;
|
reg [14:0] crc_in;
|
reg [14:0] crc_in;
|
Line 1518... |
Line 1523... |
tx <=#Tp 1'b1;
|
tx <=#Tp 1'b1;
|
end
|
end
|
end
|
end
|
|
|
|
|
|
|
always @ (posedge clk)
|
always @ (posedge clk)
|
begin
|
begin
|
if (tx_point)
|
if (tx_point)
|
tx_q <=#Tp tx;
|
tx_q <=#Tp tx & (~go_early_tx_latched);
|
end
|
end
|
|
|
|
|
/* Delayed tx point */
|
/* Delayed tx point */
|
always @ (posedge clk)
|
always @ (posedge clk)
|
Line 1632... |
Line 1638... |
|
|
assign go_early_tx = (~listen_only_mode) & need_to_tx & (~tx_state) & (~suspend) & sample_point & (~sampled_bit) & (rx_idle | last_bit_of_inter);
|
assign go_early_tx = (~listen_only_mode) & need_to_tx & (~tx_state) & (~suspend) & sample_point & (~sampled_bit) & (rx_idle | last_bit_of_inter);
|
assign go_tx = (~listen_only_mode) & need_to_tx & (~tx_state) & (~suspend) & (go_early_tx | rx_idle);
|
assign go_tx = (~listen_only_mode) & need_to_tx & (~tx_state) & (~suspend) & (go_early_tx | rx_idle);
|
|
|
|
|
|
// go_early_tx latched (for proper bit_de_stuff generation)
|
|
always @ (posedge clk or posedge rst)
|
|
begin
|
|
if (rst)
|
|
go_early_tx_latched <= 1'b0;
|
|
else if (tx_point_q)
|
|
go_early_tx_latched <=#Tp 1'b0;
|
|
else if (go_early_tx)
|
|
go_early_tx_latched <=#Tp 1'b1;
|
|
end
|
|
|
|
|
|
|
// Tx state
|
// Tx state
|
always @ (posedge clk or posedge rst)
|
always @ (posedge clk or posedge rst)
|
begin
|
begin
|
if (rst)
|
if (rst)
|
tx_state <= 1'b0;
|
tx_state <= 1'b0;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.