mirror of
https://github.com/fpganinja/taxi.git
synced 2025-12-07 16:28:40 -08:00
lss: Add some interface configuration checks to I2C modules
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -151,6 +151,13 @@ I/O pin. This would prevent devices from stretching the clock period.
|
||||
|
||||
*/
|
||||
|
||||
// check configuration
|
||||
if (s_axis_cmd.DATA_W < 12)
|
||||
$fatal(0, "Command interface width must be at least 12 bits (instance %m)");
|
||||
|
||||
if (s_axis_tx.DATA_W != 8 || m_axis_rx.DATA_W != 8)
|
||||
$fatal(0, "Data interface width must be 8 bits (instance %m)");
|
||||
|
||||
localparam [3:0]
|
||||
STATE_IDLE = 4'd0,
|
||||
STATE_ACTIVE_WRITE = 4'd1,
|
||||
|
||||
@@ -135,6 +135,10 @@ I/O pin. This would prevent devices from stretching the clock period.
|
||||
|
||||
*/
|
||||
|
||||
// check configuration
|
||||
if (s_axis_tx.DATA_W != 8 || m_axis_rx.DATA_W != 8)
|
||||
$fatal(0, "Data interface width must be 8 bits (instance %m)");
|
||||
|
||||
localparam [2:0]
|
||||
STATE_IDLE = 3'd0,
|
||||
STATE_ADDRESS = 3'd1,
|
||||
|
||||
Reference in New Issue
Block a user