Add a check to make sure driver enable is set
This commit is contained in:
parent
5f85a3b99e
commit
6b8dc6f337
|
@ -83,7 +83,7 @@ always @(posedge drv_cs_n) begin
|
|||
end
|
||||
|
||||
always @(negedge drv_sck) begin
|
||||
if (spi_active) begin
|
||||
if (drv_en & spi_active) begin
|
||||
cfg[cfg_num] <= cfg[cfg_num] << 1 | drv_sdi;
|
||||
bit_count <= bit_count + 1;
|
||||
end
|
||||
|
@ -116,7 +116,7 @@ initial begin
|
|||
$dumpvars;
|
||||
|
||||
for (i = 0; i < 5; i += 1) cfg[i] = 0;
|
||||
// TODO cycle the module long enough to get all the configuration bits
|
||||
// cycle the module long enough to get all the configuration bits
|
||||
// written out, and check to see if it worked correctly
|
||||
i = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue