[128] | 1 | //////////////////////////////////////////////////////////////////////
|
---|
| 2 | //// ////
|
---|
| 3 | //// can_acf.v ////
|
---|
| 4 | //// ////
|
---|
| 5 | //// ////
|
---|
| 6 | //// This file is part of the CAN Protocol Controller ////
|
---|
| 7 | //// http://www.opencores.org/projects/can/ ////
|
---|
| 8 | //// ////
|
---|
| 9 | //// ////
|
---|
| 10 | //// Author(s): ////
|
---|
| 11 | //// Igor Mohor ////
|
---|
| 12 | //// igorm@opencores.org ////
|
---|
| 13 | //// ////
|
---|
| 14 | //// ////
|
---|
| 15 | //// All additional information is available in the README.txt ////
|
---|
| 16 | //// file. ////
|
---|
| 17 | //// ////
|
---|
| 18 | //////////////////////////////////////////////////////////////////////
|
---|
| 19 | //// ////
|
---|
| 20 | //// Copyright (C) 2002, 2003, 2004 Authors ////
|
---|
| 21 | //// ////
|
---|
| 22 | //// This source file may be used and distributed without ////
|
---|
| 23 | //// restriction provided that this copyright statement is not ////
|
---|
| 24 | //// removed from the file and that any derivative work contains ////
|
---|
| 25 | //// the original copyright notice and the associated disclaimer. ////
|
---|
| 26 | //// ////
|
---|
| 27 | //// This source file is free software; you can redistribute it ////
|
---|
| 28 | //// and/or modify it under the terms of the GNU Lesser General ////
|
---|
| 29 | //// Public License as published by the Free Software Foundation; ////
|
---|
| 30 | //// either version 2.1 of the License, or (at your option) any ////
|
---|
| 31 | //// later version. ////
|
---|
| 32 | //// ////
|
---|
| 33 | //// This source is distributed in the hope that it will be ////
|
---|
| 34 | //// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
---|
| 35 | //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
---|
| 36 | //// PURPOSE. See the GNU Lesser General Public License for more ////
|
---|
| 37 | //// details. ////
|
---|
| 38 | //// ////
|
---|
| 39 | //// You should have received a copy of the GNU Lesser General ////
|
---|
| 40 | //// Public License along with this source; if not, download it ////
|
---|
| 41 | //// from http://www.opencores.org/lgpl.shtml ////
|
---|
| 42 | //// ////
|
---|
| 43 | //// The CAN protocol is developed by Robert Bosch GmbH and ////
|
---|
| 44 | //// protected by patents. Anybody who wants to implement this ////
|
---|
| 45 | //// CAN IP core on silicon has to obtain a CAN protocol license ////
|
---|
| 46 | //// from Bosch. ////
|
---|
| 47 | //// ////
|
---|
| 48 | //////////////////////////////////////////////////////////////////////
|
---|
| 49 | //
|
---|
| 50 | // CVS Revision History
|
---|
| 51 | //
|
---|
| 52 | // $Log: can_acf.v,v $
|
---|
| 53 | // Revision 1.9 2004/05/31 14:46:11 igorm
|
---|
| 54 | // Bit acceptance_filter_mode was inverted.
|
---|
| 55 | //
|
---|
| 56 | // Revision 1.8 2004/02/08 14:16:44 mohor
|
---|
| 57 | // Header changed.
|
---|
| 58 | //
|
---|
| 59 | // Revision 1.7 2003/07/16 13:41:34 mohor
|
---|
| 60 | // Fixed according to the linter.
|
---|
| 61 | //
|
---|
| 62 | // Revision 1.6 2003/02/10 16:02:11 mohor
|
---|
| 63 | // CAN is working according to the specification. WB interface and more
|
---|
| 64 | // registers (status, IRQ, ...) needs to be added.
|
---|
| 65 | //
|
---|
| 66 | // Revision 1.5 2003/02/09 18:40:29 mohor
|
---|
| 67 | // Overload fixed. Hard synchronization also enabled at the last bit of
|
---|
| 68 | // interframe.
|
---|
| 69 | //
|
---|
| 70 | // Revision 1.4 2003/02/09 02:24:33 mohor
|
---|
| 71 | // Bosch license warning added. Error counters finished. Overload frames
|
---|
| 72 | // still need to be fixed.
|
---|
| 73 | //
|
---|
| 74 | // Revision 1.3 2003/01/31 01:13:37 mohor
|
---|
| 75 | // backup.
|
---|
| 76 | //
|
---|
| 77 | // Revision 1.2 2003/01/14 12:19:35 mohor
|
---|
| 78 | // rx_fifo is now working.
|
---|
| 79 | //
|
---|
| 80 | // Revision 1.1 2003/01/08 02:13:15 mohor
|
---|
| 81 | // Acceptance filter added.
|
---|
| 82 | //
|
---|
| 83 | //
|
---|
| 84 | //
|
---|
| 85 | //
|
---|
| 86 |
|
---|
| 87 | // synopsys translate_off
|
---|
| 88 | `include "timescale.v"
|
---|
| 89 | // synopsys translate_on
|
---|
| 90 | `include "can_defines.v"
|
---|
| 91 |
|
---|
| 92 | module can_acf
|
---|
| 93 | (
|
---|
| 94 | clk,
|
---|
| 95 | rst,
|
---|
| 96 |
|
---|
| 97 | id,
|
---|
| 98 |
|
---|
| 99 | /* Mode register */
|
---|
| 100 | reset_mode,
|
---|
| 101 | acceptance_filter_mode,
|
---|
| 102 |
|
---|
| 103 | extended_mode,
|
---|
| 104 |
|
---|
| 105 | acceptance_code_0,
|
---|
| 106 | acceptance_code_1,
|
---|
| 107 | acceptance_code_2,
|
---|
| 108 | acceptance_code_3,
|
---|
| 109 | acceptance_mask_0,
|
---|
| 110 | acceptance_mask_1,
|
---|
| 111 | acceptance_mask_2,
|
---|
| 112 | acceptance_mask_3,
|
---|
| 113 |
|
---|
| 114 | go_rx_crc_lim,
|
---|
| 115 | go_rx_inter,
|
---|
| 116 | go_error_frame,
|
---|
| 117 |
|
---|
| 118 | data0,
|
---|
| 119 | data1,
|
---|
| 120 | rtr1,
|
---|
| 121 | rtr2,
|
---|
| 122 | ide,
|
---|
| 123 | no_byte0,
|
---|
| 124 | no_byte1,
|
---|
| 125 |
|
---|
| 126 |
|
---|
| 127 | id_ok
|
---|
| 128 |
|
---|
| 129 |
|
---|
| 130 | );
|
---|
| 131 |
|
---|
| 132 | parameter Tp = 1;
|
---|
| 133 |
|
---|
| 134 | input clk;
|
---|
| 135 | input rst;
|
---|
| 136 | input [28:0] id;
|
---|
| 137 | input reset_mode;
|
---|
| 138 | input acceptance_filter_mode;
|
---|
| 139 | input extended_mode;
|
---|
| 140 |
|
---|
| 141 | input [7:0] acceptance_code_0;
|
---|
| 142 | input [7:0] acceptance_code_1;
|
---|
| 143 | input [7:0] acceptance_code_2;
|
---|
| 144 | input [7:0] acceptance_code_3;
|
---|
| 145 | input [7:0] acceptance_mask_0;
|
---|
| 146 | input [7:0] acceptance_mask_1;
|
---|
| 147 | input [7:0] acceptance_mask_2;
|
---|
| 148 | input [7:0] acceptance_mask_3;
|
---|
| 149 | input go_rx_crc_lim;
|
---|
| 150 | input go_rx_inter;
|
---|
| 151 | input go_error_frame;
|
---|
| 152 | input [7:0] data0;
|
---|
| 153 | input [7:0] data1;
|
---|
| 154 | input rtr1;
|
---|
| 155 | input rtr2;
|
---|
| 156 | input ide;
|
---|
| 157 | input no_byte0;
|
---|
| 158 | input no_byte1;
|
---|
| 159 |
|
---|
| 160 |
|
---|
| 161 | output id_ok;
|
---|
| 162 |
|
---|
| 163 | reg id_ok;
|
---|
| 164 |
|
---|
| 165 | wire match;
|
---|
| 166 | wire match_sf_std;
|
---|
| 167 | wire match_sf_ext;
|
---|
| 168 | wire match_df_std;
|
---|
| 169 | wire match_df_ext;
|
---|
| 170 |
|
---|
| 171 |
|
---|
| 172 | // Working in basic mode. ID match for standard format (11-bit ID).
|
---|
| 173 | assign match = ( (id[3] == acceptance_code_0[0] | acceptance_mask_0[0] ) &
|
---|
| 174 | (id[4] == acceptance_code_0[1] | acceptance_mask_0[1] ) &
|
---|
| 175 | (id[5] == acceptance_code_0[2] | acceptance_mask_0[2] ) &
|
---|
| 176 | (id[6] == acceptance_code_0[3] | acceptance_mask_0[3] ) &
|
---|
| 177 | (id[7] == acceptance_code_0[4] | acceptance_mask_0[4] ) &
|
---|
| 178 | (id[8] == acceptance_code_0[5] | acceptance_mask_0[5] ) &
|
---|
| 179 | (id[9] == acceptance_code_0[6] | acceptance_mask_0[6] ) &
|
---|
| 180 | (id[10] == acceptance_code_0[7] | acceptance_mask_0[7] )
|
---|
| 181 | );
|
---|
| 182 |
|
---|
| 183 |
|
---|
| 184 | // Working in extended mode. ID match for standard format (11-bit ID). Using single filter.
|
---|
| 185 | assign match_sf_std = ( (id[3] == acceptance_code_0[0] | acceptance_mask_0[0] ) &
|
---|
| 186 | (id[4] == acceptance_code_0[1] | acceptance_mask_0[1] ) &
|
---|
| 187 | (id[5] == acceptance_code_0[2] | acceptance_mask_0[2] ) &
|
---|
| 188 | (id[6] == acceptance_code_0[3] | acceptance_mask_0[3] ) &
|
---|
| 189 | (id[7] == acceptance_code_0[4] | acceptance_mask_0[4] ) &
|
---|
| 190 | (id[8] == acceptance_code_0[5] | acceptance_mask_0[5] ) &
|
---|
| 191 | (id[9] == acceptance_code_0[6] | acceptance_mask_0[6] ) &
|
---|
| 192 | (id[10] == acceptance_code_0[7] | acceptance_mask_0[7] ) &
|
---|
| 193 |
|
---|
| 194 | (rtr1 == acceptance_code_1[4] | acceptance_mask_1[4] ) &
|
---|
| 195 | (id[0] == acceptance_code_1[5] | acceptance_mask_1[5] ) &
|
---|
| 196 | (id[1] == acceptance_code_1[6] | acceptance_mask_1[6] ) &
|
---|
| 197 | (id[2] == acceptance_code_1[7] | acceptance_mask_1[7] ) &
|
---|
| 198 |
|
---|
| 199 | (data0[0] == acceptance_code_2[0] | acceptance_mask_2[0] | no_byte0) &
|
---|
| 200 | (data0[1] == acceptance_code_2[1] | acceptance_mask_2[1] | no_byte0) &
|
---|
| 201 | (data0[2] == acceptance_code_2[2] | acceptance_mask_2[2] | no_byte0) &
|
---|
| 202 | (data0[3] == acceptance_code_2[3] | acceptance_mask_2[3] | no_byte0) &
|
---|
| 203 | (data0[4] == acceptance_code_2[4] | acceptance_mask_2[4] | no_byte0) &
|
---|
| 204 | (data0[5] == acceptance_code_2[5] | acceptance_mask_2[5] | no_byte0) &
|
---|
| 205 | (data0[6] == acceptance_code_2[6] | acceptance_mask_2[6] | no_byte0) &
|
---|
| 206 | (data0[7] == acceptance_code_2[7] | acceptance_mask_2[7] | no_byte0) &
|
---|
| 207 |
|
---|
| 208 | (data1[0] == acceptance_code_3[0] | acceptance_mask_3[0] | no_byte1) &
|
---|
| 209 | (data1[1] == acceptance_code_3[1] | acceptance_mask_3[1] | no_byte1) &
|
---|
| 210 | (data1[2] == acceptance_code_3[2] | acceptance_mask_3[2] | no_byte1) &
|
---|
| 211 | (data1[3] == acceptance_code_3[3] | acceptance_mask_3[3] | no_byte1) &
|
---|
| 212 | (data1[4] == acceptance_code_3[4] | acceptance_mask_3[4] | no_byte1) &
|
---|
| 213 | (data1[5] == acceptance_code_3[5] | acceptance_mask_3[5] | no_byte1) &
|
---|
| 214 | (data1[6] == acceptance_code_3[6] | acceptance_mask_3[6] | no_byte1) &
|
---|
| 215 | (data1[7] == acceptance_code_3[7] | acceptance_mask_3[7] | no_byte1)
|
---|
| 216 | );
|
---|
| 217 |
|
---|
| 218 |
|
---|
| 219 |
|
---|
| 220 | // Working in extended mode. ID match for extended format (29-bit ID). Using single filter.
|
---|
| 221 | assign match_sf_ext = ( (id[21] == acceptance_code_0[0] | acceptance_mask_0[0] ) &
|
---|
| 222 | (id[22] == acceptance_code_0[1] | acceptance_mask_0[1] ) &
|
---|
| 223 | (id[23] == acceptance_code_0[2] | acceptance_mask_0[2] ) &
|
---|
| 224 | (id[24] == acceptance_code_0[3] | acceptance_mask_0[3] ) &
|
---|
| 225 | (id[25] == acceptance_code_0[4] | acceptance_mask_0[4] ) &
|
---|
| 226 | (id[26] == acceptance_code_0[5] | acceptance_mask_0[5] ) &
|
---|
| 227 | (id[27] == acceptance_code_0[6] | acceptance_mask_0[6] ) &
|
---|
| 228 | (id[28] == acceptance_code_0[7] | acceptance_mask_0[7] ) &
|
---|
| 229 |
|
---|
| 230 | (id[13] == acceptance_code_1[0] | acceptance_mask_1[0] ) &
|
---|
| 231 | (id[14] == acceptance_code_1[1] | acceptance_mask_1[1] ) &
|
---|
| 232 | (id[15] == acceptance_code_1[2] | acceptance_mask_1[2] ) &
|
---|
| 233 | (id[16] == acceptance_code_1[3] | acceptance_mask_1[3] ) &
|
---|
| 234 | (id[17] == acceptance_code_1[4] | acceptance_mask_1[4] ) &
|
---|
| 235 | (id[18] == acceptance_code_1[5] | acceptance_mask_1[5] ) &
|
---|
| 236 | (id[19] == acceptance_code_1[6] | acceptance_mask_1[6] ) &
|
---|
| 237 | (id[20] == acceptance_code_1[7] | acceptance_mask_1[7] ) &
|
---|
| 238 |
|
---|
| 239 | (id[5] == acceptance_code_2[0] | acceptance_mask_2[0] ) &
|
---|
| 240 | (id[6] == acceptance_code_2[1] | acceptance_mask_2[1] ) &
|
---|
| 241 | (id[7] == acceptance_code_2[2] | acceptance_mask_2[2] ) &
|
---|
| 242 | (id[8] == acceptance_code_2[3] | acceptance_mask_2[3] ) &
|
---|
| 243 | (id[9] == acceptance_code_2[4] | acceptance_mask_2[4] ) &
|
---|
| 244 | (id[10] == acceptance_code_2[5] | acceptance_mask_2[5] ) &
|
---|
| 245 | (id[11] == acceptance_code_2[6] | acceptance_mask_2[6] ) &
|
---|
| 246 | (id[12] == acceptance_code_2[7] | acceptance_mask_2[7] ) &
|
---|
| 247 |
|
---|
| 248 | (rtr2 == acceptance_code_3[2] | acceptance_mask_3[2] ) &
|
---|
| 249 | (id[0] == acceptance_code_3[3] | acceptance_mask_3[3] ) &
|
---|
| 250 | (id[1] == acceptance_code_3[4] | acceptance_mask_3[4] ) &
|
---|
| 251 | (id[2] == acceptance_code_3[5] | acceptance_mask_3[5] ) &
|
---|
| 252 | (id[3] == acceptance_code_3[6] | acceptance_mask_3[6] ) &
|
---|
| 253 | (id[4] == acceptance_code_3[7] | acceptance_mask_3[7] )
|
---|
| 254 |
|
---|
| 255 | );
|
---|
| 256 |
|
---|
| 257 |
|
---|
| 258 | // Working in extended mode. ID match for standard format (11-bit ID). Using double filter.
|
---|
| 259 | assign match_df_std = (((id[3] == acceptance_code_0[0] | acceptance_mask_0[0] ) &
|
---|
| 260 | (id[4] == acceptance_code_0[1] | acceptance_mask_0[1] ) &
|
---|
| 261 | (id[5] == acceptance_code_0[2] | acceptance_mask_0[2] ) &
|
---|
| 262 | (id[6] == acceptance_code_0[3] | acceptance_mask_0[3] ) &
|
---|
| 263 | (id[7] == acceptance_code_0[4] | acceptance_mask_0[4] ) &
|
---|
| 264 | (id[8] == acceptance_code_0[5] | acceptance_mask_0[5] ) &
|
---|
| 265 | (id[9] == acceptance_code_0[6] | acceptance_mask_0[6] ) &
|
---|
| 266 | (id[10] == acceptance_code_0[7] | acceptance_mask_0[7] ) &
|
---|
| 267 |
|
---|
| 268 | (rtr1 == acceptance_code_1[4] | acceptance_mask_1[4] ) &
|
---|
| 269 | (id[0] == acceptance_code_1[5] | acceptance_mask_1[5] ) &
|
---|
| 270 | (id[1] == acceptance_code_1[6] | acceptance_mask_1[6] ) &
|
---|
| 271 | (id[2] == acceptance_code_1[7] | acceptance_mask_1[7] ) &
|
---|
| 272 |
|
---|
| 273 | (data0[0] == acceptance_code_3[0] | acceptance_mask_3[0] | no_byte0) &
|
---|
| 274 | (data0[1] == acceptance_code_3[1] | acceptance_mask_3[1] | no_byte0) &
|
---|
| 275 | (data0[2] == acceptance_code_3[2] | acceptance_mask_3[2] | no_byte0) &
|
---|
| 276 | (data0[3] == acceptance_code_3[3] | acceptance_mask_3[3] | no_byte0) &
|
---|
| 277 | (data0[4] == acceptance_code_1[4] | acceptance_mask_1[4] | no_byte0) &
|
---|
| 278 | (data0[5] == acceptance_code_1[5] | acceptance_mask_1[5] | no_byte0) &
|
---|
| 279 | (data0[6] == acceptance_code_1[6] | acceptance_mask_1[6] | no_byte0) &
|
---|
| 280 | (data0[7] == acceptance_code_1[7] | acceptance_mask_1[7] | no_byte0) )
|
---|
| 281 |
|
---|
| 282 | |
|
---|
| 283 |
|
---|
| 284 | ((id[3] == acceptance_code_2[0] | acceptance_mask_2[0] ) &
|
---|
| 285 | (id[4] == acceptance_code_2[1] | acceptance_mask_2[1] ) &
|
---|
| 286 | (id[5] == acceptance_code_2[2] | acceptance_mask_2[2] ) &
|
---|
| 287 | (id[6] == acceptance_code_2[3] | acceptance_mask_2[3] ) &
|
---|
| 288 | (id[7] == acceptance_code_2[4] | acceptance_mask_2[4] ) &
|
---|
| 289 | (id[8] == acceptance_code_2[5] | acceptance_mask_2[5] ) &
|
---|
| 290 | (id[9] == acceptance_code_2[6] | acceptance_mask_2[6] ) &
|
---|
| 291 | (id[10] == acceptance_code_2[7] | acceptance_mask_2[7] ) &
|
---|
| 292 |
|
---|
| 293 | (rtr1 == acceptance_code_3[4] | acceptance_mask_3[4] ) &
|
---|
| 294 | (id[0] == acceptance_code_3[5] | acceptance_mask_3[5] ) &
|
---|
| 295 | (id[1] == acceptance_code_3[6] | acceptance_mask_3[6] ) &
|
---|
| 296 | (id[2] == acceptance_code_3[7] | acceptance_mask_3[7] ) )
|
---|
| 297 |
|
---|
| 298 | );
|
---|
| 299 |
|
---|
| 300 |
|
---|
| 301 | // Working in extended mode. ID match for extended format (29-bit ID). Using double filter.
|
---|
| 302 | assign match_df_ext = (((id[21] == acceptance_code_0[0] | acceptance_mask_0[0] ) &
|
---|
| 303 | (id[22] == acceptance_code_0[1] | acceptance_mask_0[1] ) &
|
---|
| 304 | (id[23] == acceptance_code_0[2] | acceptance_mask_0[2] ) &
|
---|
| 305 | (id[24] == acceptance_code_0[3] | acceptance_mask_0[3] ) &
|
---|
| 306 | (id[25] == acceptance_code_0[4] | acceptance_mask_0[4] ) &
|
---|
| 307 | (id[26] == acceptance_code_0[5] | acceptance_mask_0[5] ) &
|
---|
| 308 | (id[27] == acceptance_code_0[6] | acceptance_mask_0[6] ) &
|
---|
| 309 | (id[28] == acceptance_code_0[7] | acceptance_mask_0[7] ) &
|
---|
| 310 |
|
---|
| 311 | (id[13] == acceptance_code_1[0] | acceptance_mask_1[0] ) &
|
---|
| 312 | (id[14] == acceptance_code_1[1] | acceptance_mask_1[1] ) &
|
---|
| 313 | (id[15] == acceptance_code_1[2] | acceptance_mask_1[2] ) &
|
---|
| 314 | (id[16] == acceptance_code_1[3] | acceptance_mask_1[3] ) &
|
---|
| 315 | (id[17] == acceptance_code_1[4] | acceptance_mask_1[4] ) &
|
---|
| 316 | (id[18] == acceptance_code_1[5] | acceptance_mask_1[5] ) &
|
---|
| 317 | (id[19] == acceptance_code_1[6] | acceptance_mask_1[6] ) &
|
---|
| 318 | (id[20] == acceptance_code_1[7] | acceptance_mask_1[7] ) )
|
---|
| 319 |
|
---|
| 320 | |
|
---|
| 321 |
|
---|
| 322 | ((id[21] == acceptance_code_2[0] | acceptance_mask_2[0] ) &
|
---|
| 323 | (id[22] == acceptance_code_2[1] | acceptance_mask_2[1] ) &
|
---|
| 324 | (id[23] == acceptance_code_2[2] | acceptance_mask_2[2] ) &
|
---|
| 325 | (id[24] == acceptance_code_2[3] | acceptance_mask_2[3] ) &
|
---|
| 326 | (id[25] == acceptance_code_2[4] | acceptance_mask_2[4] ) &
|
---|
| 327 | (id[26] == acceptance_code_2[5] | acceptance_mask_2[5] ) &
|
---|
| 328 | (id[27] == acceptance_code_2[6] | acceptance_mask_2[6] ) &
|
---|
| 329 | (id[28] == acceptance_code_2[7] | acceptance_mask_2[7] ) &
|
---|
| 330 |
|
---|
| 331 | (id[13] == acceptance_code_3[0] | acceptance_mask_3[0] ) &
|
---|
| 332 | (id[14] == acceptance_code_3[1] | acceptance_mask_3[1] ) &
|
---|
| 333 | (id[15] == acceptance_code_3[2] | acceptance_mask_3[2] ) &
|
---|
| 334 | (id[16] == acceptance_code_3[3] | acceptance_mask_3[3] ) &
|
---|
| 335 | (id[17] == acceptance_code_3[4] | acceptance_mask_3[4] ) &
|
---|
| 336 | (id[18] == acceptance_code_3[5] | acceptance_mask_3[5] ) &
|
---|
| 337 | (id[19] == acceptance_code_3[6] | acceptance_mask_3[6] ) &
|
---|
| 338 | (id[20] == acceptance_code_3[7] | acceptance_mask_3[7] ) )
|
---|
| 339 | );
|
---|
| 340 |
|
---|
| 341 |
|
---|
| 342 |
|
---|
| 343 | // ID ok signal generation
|
---|
| 344 | always @ (posedge clk or posedge rst)
|
---|
| 345 | begin
|
---|
| 346 | if (rst)
|
---|
| 347 | id_ok <= 1'b0;
|
---|
| 348 | else if (go_rx_crc_lim) // sample_point is already included in go_rx_crc_lim
|
---|
| 349 | begin
|
---|
| 350 | if (extended_mode)
|
---|
| 351 | begin
|
---|
| 352 | if (~acceptance_filter_mode) // dual filter
|
---|
| 353 | begin
|
---|
| 354 | if (ide) // extended frame message
|
---|
| 355 | id_ok <=#Tp match_df_ext;
|
---|
| 356 | else // standard frame message
|
---|
| 357 | id_ok <=#Tp match_df_std;
|
---|
| 358 | end
|
---|
| 359 | else // single filter
|
---|
| 360 | begin
|
---|
| 361 | if (ide) // extended frame message
|
---|
| 362 | id_ok <=#Tp match_sf_ext;
|
---|
| 363 | else // standard frame message
|
---|
| 364 | id_ok <=#Tp match_sf_std;
|
---|
| 365 | end
|
---|
| 366 | end
|
---|
| 367 | else
|
---|
| 368 | id_ok <=#Tp match;
|
---|
| 369 | end
|
---|
| 370 | else if (reset_mode | go_rx_inter | go_error_frame) // sample_point is already included in go_rx_inter
|
---|
| 371 | id_ok <=#Tp 1'b0;
|
---|
| 372 | end
|
---|
| 373 |
|
---|
| 374 |
|
---|
| 375 |
|
---|
| 376 |
|
---|
| 377 |
|
---|
| 378 |
|
---|
| 379 |
|
---|
| 380 |
|
---|
| 381 |
|
---|
| 382 | endmodule
|
---|