Browse Source

fixed wrong period parameter usage in spi_master() procedure

pull/1/head
T. Meissner 10 years ago
parent
commit
f1de455fd4
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      sim/SimP.vhd

+ 7
- 7
sim/SimP.vhd View File

@ -60,28 +60,28 @@ package body SimP is
if (cpha = 0) then
for i in data_in'range loop
mosi <= data_in(i);
wait for period;
wait for period/2;
sclk <= not(sclk);
data_out(i) := miso;
wait for period;
wait for period/2;
sclk <= not(sclk);
end loop;
wait for period;
wait for period/2;
else
mosi <= '1';
wait for period;
wait for period/2;
for i in data_in'range loop
sclk <= not(sclk);
mosi <= data_in(i);
wait for period;
wait for period/2;
sclk <= not(sclk);
data_out(i) := miso;
wait for period;
wait for period/2;
end loop;
end if;
ste <= '1';
mosi <= '1';
wait for period;
wait for period/2;
end procedure spi_master;


Loading…
Cancel
Save