Browse Source

Versuch 2 Hardware funktioniert

master
brandlfl78731 3 weeks ago
parent
commit
de8d181dde
80 changed files with 4425 additions and 452 deletions
  1. 29
    33
      hardware/signal_processing/sine.vhd
  2. 0
    0
      tests/hardware/task_cosine/.libwork
  3. 1
    0
      tests/hardware/task_cosine/data.py
  4. 2213
    0
      tests/hardware/task_cosine/modelsim.ini
  5. 65
    0
      tests/hardware/task_cosine/transcript
  6. 0
    0
      tests/hardware/task_cosine/work/@_opt/VH_HASH_DATA
  7. BIN
      tests/hardware/task_cosine/work/@_opt/_data/exemptjBUnsb
  8. BIN
      tests/hardware/task_cosine/work/@_opt/_data/exemptqIkZaj
  9. BIN
      tests/hardware/task_cosine/work/@_opt/_data/exemptqJmiWx
  10. BIN
      tests/hardware/task_cosine/work/@_opt/_lib.qdb
  11. BIN
      tests/hardware/task_cosine/work/@_opt/_lib1_0.qdb
  12. BIN
      tests/hardware/task_cosine/work/@_opt/_lib1_0.qpg
  13. BIN
      tests/hardware/task_cosine/work/@_opt/_lib1_0.qtl
  14. BIN
      tests/hardware/task_cosine/work/@_opt/_lib2_0.qdb
  15. BIN
      tests/hardware/task_cosine/work/@_opt/_lib2_0.qpg
  16. BIN
      tests/hardware/task_cosine/work/@_opt/_lib2_0.qtl
  17. BIN
      tests/hardware/task_cosine/work/@_opt/_lib3_0.qdb
  18. BIN
      tests/hardware/task_cosine/work/@_opt/_lib3_0.qpg
  19. BIN
      tests/hardware/task_cosine/work/@_opt/_lib3_0.qtl
  20. BIN
      tests/hardware/task_cosine/work/@_opt/_lib4_0.qdb
  21. BIN
      tests/hardware/task_cosine/work/@_opt/_lib4_0.qpg
  22. BIN
      tests/hardware/task_cosine/work/@_opt/_lib4_0.qtl
  23. BIN
      tests/hardware/task_cosine/work/@_opt/_lib5_0.qdb
  24. BIN
      tests/hardware/task_cosine/work/@_opt/_lib5_0.qpg
  25. BIN
      tests/hardware/task_cosine/work/@_opt/_lib5_0.qtl
  26. 1132
    0
      tests/hardware/task_cosine/work/_info
  27. BIN
      tests/hardware/task_cosine/work/_lib.qdb
  28. BIN
      tests/hardware/task_cosine/work/_lib1_1.qdb
  29. BIN
      tests/hardware/task_cosine/work/_lib1_1.qpg
  30. BIN
      tests/hardware/task_cosine/work/_lib1_1.qtl
  31. 4
    0
      tests/hardware/task_cosine/work/_vmake
  32. 1
    0
      tests/hardware/task_sine/data.py
  33. 65
    0
      tests/hardware/task_sine/transcript
  34. BIN
      tests/hardware/task_sine/vsim.wlf
  35. 0
    0
      tests/hardware/task_sine/work/@_opt/VH_HASH_DATA
  36. BIN
      tests/hardware/task_sine/work/@_opt/_data/exemptFoldDh
  37. BIN
      tests/hardware/task_sine/work/@_opt/_data/exempttNOZiD
  38. BIN
      tests/hardware/task_sine/work/@_opt/_data/exemptyUf5oW
  39. BIN
      tests/hardware/task_sine/work/@_opt/_lib.qdb
  40. BIN
      tests/hardware/task_sine/work/@_opt/_lib1_7.qdb
  41. BIN
      tests/hardware/task_sine/work/@_opt/_lib1_7.qpg
  42. BIN
      tests/hardware/task_sine/work/@_opt/_lib1_7.qtl
  43. BIN
      tests/hardware/task_sine/work/@_opt/_lib2_7.qdb
  44. BIN
      tests/hardware/task_sine/work/@_opt/_lib2_7.qpg
  45. BIN
      tests/hardware/task_sine/work/@_opt/_lib2_7.qtl
  46. BIN
      tests/hardware/task_sine/work/@_opt/_lib3_7.qdb
  47. BIN
      tests/hardware/task_sine/work/@_opt/_lib3_7.qpg
  48. BIN
      tests/hardware/task_sine/work/@_opt/_lib3_7.qtl
  49. BIN
      tests/hardware/task_sine/work/@_opt/_lib4_7.qdb
  50. BIN
      tests/hardware/task_sine/work/@_opt/_lib4_7.qpg
  51. BIN
      tests/hardware/task_sine/work/@_opt/_lib4_7.qtl
  52. BIN
      tests/hardware/task_sine/work/@_opt/_lib5_7.qdb
  53. BIN
      tests/hardware/task_sine/work/@_opt/_lib5_7.qpg
  54. BIN
      tests/hardware/task_sine/work/@_opt/_lib5_7.qtl
  55. 0
    0
      tests/hardware/task_sine/work/@_opt1/VH_HASH_DATA
  56. BIN
      tests/hardware/task_sine/work/@_opt1/_data/exemptbUxNgK
  57. BIN
      tests/hardware/task_sine/work/@_opt1/_data/exemptmIZlvu
  58. BIN
      tests/hardware/task_sine/work/@_opt1/_data/exemptxgWkrr
  59. BIN
      tests/hardware/task_sine/work/@_opt1/_lib.qdb
  60. BIN
      tests/hardware/task_sine/work/@_opt1/_lib1_5.qdb
  61. BIN
      tests/hardware/task_sine/work/@_opt1/_lib1_5.qpg
  62. BIN
      tests/hardware/task_sine/work/@_opt1/_lib1_5.qtl
  63. BIN
      tests/hardware/task_sine/work/@_opt1/_lib2_5.qdb
  64. BIN
      tests/hardware/task_sine/work/@_opt1/_lib2_5.qpg
  65. BIN
      tests/hardware/task_sine/work/@_opt1/_lib2_5.qtl
  66. BIN
      tests/hardware/task_sine/work/@_opt1/_lib3_5.qdb
  67. BIN
      tests/hardware/task_sine/work/@_opt1/_lib3_5.qpg
  68. BIN
      tests/hardware/task_sine/work/@_opt1/_lib3_5.qtl
  69. BIN
      tests/hardware/task_sine/work/@_opt1/_lib4_5.qdb
  70. BIN
      tests/hardware/task_sine/work/@_opt1/_lib4_5.qpg
  71. BIN
      tests/hardware/task_sine/work/@_opt1/_lib4_5.qtl
  72. BIN
      tests/hardware/task_sine/work/@_opt1/_lib5_5.qdb
  73. BIN
      tests/hardware/task_sine/work/@_opt1/_lib5_5.qpg
  74. BIN
      tests/hardware/task_sine/work/@_opt1/_lib5_5.qtl
  75. 915
    419
      tests/hardware/task_sine/work/_info
  76. BIN
      tests/hardware/task_sine/work/_lib.qdb
  77. BIN
      tests/hardware/task_sine/work/_lib1_3.qtl
  78. BIN
      tests/hardware/task_sine/work/_lib1_45.qdb
  79. BIN
      tests/hardware/task_sine/work/_lib1_45.qpg
  80. BIN
      tests/hardware/task_sine/work/_lib1_45.qtl

+ 29
- 33
hardware/signal_processing/sine.vhd View File

@@ -36,10 +36,12 @@ architecture rtl of sine is
signal result_valid_flag : std_logic;
signal angle_sig : signed( 31 downto 0);
signal ergebnis : signed( 31 downto 0 );
signal ampl_sig : signed( 31 downto 0 );

--Zustände für die Zustandsmaschine für die Berechnung
type CalcState is (
CALC_IDLE,
CALC_START,
CALC_SINE,
CALC_STORE_RESULT
);
@@ -49,6 +51,9 @@ architecture rtl of sine is

begin
u_float_sine : entity work.float_sine -- Das hier ist der Core!
generic map (
ITERATIONS => 8
)
port map (
clk => clk,
reset => reset,
@@ -60,7 +65,7 @@ begin
);

--Bei diesem task nichts ändern!
task_state_transitions : process ( current_task_state, task_start, index ) is
task_state_transitions : process ( all ) is
begin
next_task_state <= current_task_state;
case current_task_state is
@@ -87,14 +92,20 @@ begin
case current_calc_state is
when CALC_IDLE=>
if (current_task_state= work.task.TASK_RUNNING) then
next_calc_state <= CALC_SINE;
next_calc_state <= CALC_START;
end if;
when CALC_START=>
next_calc_state <= CALC_SINE;
when CALC_SINE =>
if (result_valid_flag = '1') then
if (result_valid_flag = '1' and busy_flag = '0') then --or falling_edge( busy) ?
next_calc_state <= CALC_STORE_RESULT;
end if;
when CALC_STORE_RESULT =>
next_calc_state <= CALC_IDLE;
if ( index = work.task.STREAM_LEN ) then
next_calc_state <= CALC_IDLE;
else
next_calc_state <= CALC_START;
end if;
end case;
end process calc_state_transitions;

@@ -120,50 +131,35 @@ begin
begin
if (reset = '1') then
index <= 0;
data_valid_flag <= '0';
current_calc_state <= CALC_IDLE;
ergebnis <= (others => '0');
--ergebnis <= (others => '0'); --Wird von IP Core gesteuert und darf deshalb hier nicht getrieben werden
signal_writedata <= (others => '0');
signal_write <= '0';
angle_sig <= (others => '0');
elsif (rising_edge( clk)) then
current_calc_state <= next_calc_state;
case next_calc_state is
when CALC_IDLE =>
data_valid_flag <= '0';
signal_write <= '0';
when CALC_SINE => --hier Berechnung mit IP Core?
angle_sig <= signed (phase);
ampl_sig <= signed (amplitude);
when CALC_START =>
data_valid_flag <= '1';
when CALC_STORE_RESULT =>
signal_write <= '0';
angle_sig <= angle_sig + signed(step_size); --step_size = 2 * PI / 32
when CALC_SINE => --hier Berechnung mit IP Core?
data_valid_flag <= '0';
when CALC_STORE_RESULT =>
index <= index + 1;
signal_write <= '1';
signal_writedata <= std_logic_vector( ergebnis ); --Ergebnis schreiben, ergebnis direkt aus IP Core
--Berechne float multiplikation zu Fuss. Exponent + Exponent usw.
signal_writedata <= std_logic_vector( ergebnis(31 downto 31) & (ergebnis(30 downto 23) + (signed(ampl_sig(30 downto 23)) - 127)) & ergebnis(22 downto 0));

end case;
end if;
end process sync;
task_state <= current_task_state;

--Altes Programm
sync : process ( clk, reset ) is
begin
if ( reset = '1' ) then
current_task_state <= work.task.TASK_IDLE;
index <= 0;
elsif ( rising_edge( clk ) ) then
current_task_state <= next_task_state;
case next_task_state is
when work.task.TASK_IDLE =>
index <= 0;
signal_write <= '0';
when work.task.TASK_RUNNING =>
index <= index + 1;
signal_write <= '1';
signal_writedata <= ( others => '0' );
when work.task.TASK_DONE =>
index <= 0;
signal_write <= '0';
end case;
end if;
end process sync;

task_state <= current_task_state;

end architecture rtl;

tests/hardware/task_sine/work/_lib1_3.qpg → tests/hardware/task_cosine/.libwork View File


+ 1
- 0
tests/hardware/task_cosine/data.py
File diff suppressed because it is too large
View File


+ 2213
- 0
tests/hardware/task_cosine/modelsim.ini
File diff suppressed because it is too large
View File


+ 65
- 0
tests/hardware/task_cosine/transcript View File

@@ -0,0 +1,65 @@
# vsim -voptargs="+acc" -c work.test_task_cosine -do "set StdArithNoWarnings 1; set NumericStdNoWarnings 1; run -all" -gCHECK_RESULTS=false
# Start time: 10:17:57 on Nov 27,2024
# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
# ** Warning: (vopt-10587) Some optimizations are turned off because the +acc switch is in effect. This will cause your simulation to run slowly. Please use -access/-debug to maintain needed visibility.
# ** Note: (vopt-143) Recognized 2 FSMs in architecture body "sine(rtl)".
# ** Note: (vsim-12126) Error and warning message counts have been restored: Errors=0, Warnings=1.
# // Questa Sim-64
# // Version 2023.2 linux_x86_64 Apr 11 2023
# //
# // Copyright 1991-2023 Mentor Graphics Corporation
# // All Rights Reserved.
# //
# // QuestaSim and its associated documentation contain trade
# // secrets and commercial or financial information that are the property of
# // Mentor Graphics Corporation and are privileged, confidential,
# // and exempt from disclosure under the Freedom of Information Act,
# // 5 U.S.C. Section 552. Furthermore, this information
# // is prohibited from disclosure under the Trade Secrets Act,
# // 18 U.S.C. Section 1905.
# //
# Loading std.standard
# Loading std.textio(body)
# Loading ieee.std_logic_1164(body)
# Loading ieee.numeric_std(body)
# Loading ieee.fixed_float_types
# Loading ieee.math_real(body)
# Loading ieee.fixed_generic_pkg(body)
# Loading ieee.float_generic_pkg(body)
# Loading ieee.fixed_pkg
# Loading ieee.float_pkg
# Loading work.reg32(body)
# Loading work.avalon_slave
# Loading work.test_utility(body)
# Loading work.test_avalon_slave(body)
# Loading work.task(body)
# Loading work.cosine_data
# Loading work.test_hardware_task(body)
# Loading work.test_data_channel_pkg(body)
# Loading std.env(body)
# Loading work.test_task_cosine(test)#1
# Loading work.float(body)
# Loading work.task_sine(struct)#1
# Loading work.hardware_task_control(rtl)#1
# Loading work.avalon_slave_transitions(rtl)#1
# Loading work.cordic_pkg(body)
# Loading work.sine(rtl)#1
# Loading work.float_sine(rtl)#1
# Loading work.fixed_sine(rtl)#1
# Loading work.cordic(rtl)#1
# Loading work.data_channel(struct)#1
# Loading work.data_channel_control(rtl)#1
# Loading work.avalon_slave_transitions(rtl)#2
# Loading work.data_sink_mux(rtl)#1
# Loading work.fifo(rtl)#1
# Loading work.data_source_mux(rtl)#1
# set StdArithNoWarnings 1
# 1
# set NumericStdNoWarnings 1
# 1
# run -all
# test_configure ... [ OK ]
# test_execute ... [ OK ]
# write_content ... [ OK ]
# End time: 10:17:57 on Nov 27,2024, Elapsed time: 0:00:00
# Errors: 0, Warnings: 1

+ 0
- 0
tests/hardware/task_cosine/work/@_opt/VH_HASH_DATA View File


BIN
tests/hardware/task_cosine/work/@_opt/_data/exemptjBUnsb View File


BIN
tests/hardware/task_cosine/work/@_opt/_data/exemptqIkZaj View File


BIN
tests/hardware/task_cosine/work/@_opt/_data/exemptqJmiWx View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib1_0.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib1_0.qpg View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib1_0.qtl View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib2_0.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib2_0.qpg View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib2_0.qtl View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib3_0.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib3_0.qpg View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib3_0.qtl View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib4_0.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib4_0.qpg View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib4_0.qtl View File


BIN
tests/hardware/task_sine/work/_lib1_3.qdb → tests/hardware/task_cosine/work/@_opt/_lib5_0.qdb View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib5_0.qpg View File


BIN
tests/hardware/task_cosine/work/@_opt/_lib5_0.qtl View File


+ 1132
- 0
tests/hardware/task_cosine/work/_info
File diff suppressed because it is too large
View File


BIN
tests/hardware/task_cosine/work/_lib.qdb View File


BIN
tests/hardware/task_cosine/work/_lib1_1.qdb View File


BIN
tests/hardware/task_cosine/work/_lib1_1.qpg View File


BIN
tests/hardware/task_cosine/work/_lib1_1.qtl View File


+ 4
- 0
tests/hardware/task_cosine/work/_vmake View File

@@ -0,0 +1,4 @@
m255
K4
z0
cModel Technology

+ 1
- 0
tests/hardware/task_sine/data.py
File diff suppressed because it is too large
View File


+ 65
- 0
tests/hardware/task_sine/transcript View File

@@ -0,0 +1,65 @@
# vsim -voptargs="+acc" -c work.test_task_sine -do "set StdArithNoWarnings 1; set NumericStdNoWarnings 1; run -all" -gCHECK_RESULTS=false
# Start time: 10:15:59 on Nov 27,2024
# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
# ** Warning: (vopt-10587) Some optimizations are turned off because the +acc switch is in effect. This will cause your simulation to run slowly. Please use -access/-debug to maintain needed visibility.
# ** Note: (vopt-143) Recognized 2 FSMs in architecture body "sine(rtl)".
# ** Note: (vsim-12126) Error and warning message counts have been restored: Errors=0, Warnings=1.
# // Questa Sim-64
# // Version 2023.2 linux_x86_64 Apr 11 2023
# //
# // Copyright 1991-2023 Mentor Graphics Corporation
# // All Rights Reserved.
# //
# // QuestaSim and its associated documentation contain trade
# // secrets and commercial or financial information that are the property of
# // Mentor Graphics Corporation and are privileged, confidential,
# // and exempt from disclosure under the Freedom of Information Act,
# // 5 U.S.C. Section 552. Furthermore, this information
# // is prohibited from disclosure under the Trade Secrets Act,
# // 18 U.S.C. Section 1905.
# //
# Loading std.standard
# Loading std.textio(body)
# Loading ieee.std_logic_1164(body)
# Loading ieee.numeric_std(body)
# Loading ieee.fixed_float_types
# Loading ieee.math_real(body)
# Loading ieee.fixed_generic_pkg(body)
# Loading ieee.float_generic_pkg(body)
# Loading ieee.fixed_pkg
# Loading ieee.float_pkg
# Loading work.reg32(body)
# Loading work.avalon_slave
# Loading work.test_utility(body)
# Loading work.test_avalon_slave(body)
# Loading work.task(body)
# Loading work.sine_data
# Loading work.test_hardware_task(body)
# Loading work.test_data_channel_pkg(body)
# Loading std.env(body)
# Loading work.test_task_sine(test)#1
# Loading work.float(body)
# Loading work.task_sine(struct)#1
# Loading work.hardware_task_control(rtl)#1
# Loading work.avalon_slave_transitions(rtl)#1
# Loading work.cordic_pkg(body)
# Loading work.sine(rtl)#1
# Loading work.float_sine(rtl)#1
# Loading work.fixed_sine(rtl)#1
# Loading work.cordic(rtl)#1
# Loading work.data_channel(struct)#1
# Loading work.data_channel_control(rtl)#1
# Loading work.avalon_slave_transitions(rtl)#2
# Loading work.data_sink_mux(rtl)#1
# Loading work.fifo(rtl)#1
# Loading work.data_source_mux(rtl)#1
# set StdArithNoWarnings 1
# 1
# set NumericStdNoWarnings 1
# 1
# run -all
# test_configure ... [ OK ]
# test_execute ... [ OK ]
# write_content ... [ OK ]
# End time: 10:16:00 on Nov 27,2024, Elapsed time: 0:00:01
# Errors: 0, Warnings: 1

BIN
tests/hardware/task_sine/vsim.wlf View File


+ 0
- 0
tests/hardware/task_sine/work/@_opt/VH_HASH_DATA View File


BIN
tests/hardware/task_sine/work/@_opt/_data/exemptFoldDh View File


BIN
tests/hardware/task_sine/work/@_opt/_data/exempttNOZiD View File


BIN
tests/hardware/task_sine/work/@_opt/_data/exemptyUf5oW View File


BIN
tests/hardware/task_sine/work/@_opt/_lib.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib1_7.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib1_7.qpg View File


BIN
tests/hardware/task_sine/work/@_opt/_lib1_7.qtl View File


BIN
tests/hardware/task_sine/work/@_opt/_lib2_7.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib2_7.qpg View File


BIN
tests/hardware/task_sine/work/@_opt/_lib2_7.qtl View File


BIN
tests/hardware/task_sine/work/@_opt/_lib3_7.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib3_7.qpg View File


BIN
tests/hardware/task_sine/work/@_opt/_lib3_7.qtl View File


BIN
tests/hardware/task_sine/work/@_opt/_lib4_7.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib4_7.qpg View File


BIN
tests/hardware/task_sine/work/@_opt/_lib4_7.qtl View File


BIN
tests/hardware/task_sine/work/@_opt/_lib5_7.qdb View File


BIN
tests/hardware/task_sine/work/@_opt/_lib5_7.qpg View File


BIN
tests/hardware/task_sine/work/@_opt/_lib5_7.qtl View File


+ 0
- 0
tests/hardware/task_sine/work/@_opt1/VH_HASH_DATA View File


BIN
tests/hardware/task_sine/work/@_opt1/_data/exemptbUxNgK View File


BIN
tests/hardware/task_sine/work/@_opt1/_data/exemptmIZlvu View File


BIN
tests/hardware/task_sine/work/@_opt1/_data/exemptxgWkrr View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib1_5.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib1_5.qpg View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib1_5.qtl View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib2_5.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib2_5.qpg View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib2_5.qtl View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib3_5.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib3_5.qpg View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib3_5.qtl View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib4_5.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib4_5.qpg View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib4_5.qtl View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib5_5.qdb View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib5_5.qpg View File


BIN
tests/hardware/task_sine/work/@_opt1/_lib5_5.qtl View File


+ 915
- 419
tests/hardware/task_sine/work/_info
File diff suppressed because it is too large
View File


BIN
tests/hardware/task_sine/work/_lib.qdb View File


BIN
tests/hardware/task_sine/work/_lib1_3.qtl View File


BIN
tests/hardware/task_sine/work/_lib1_45.qdb View File


BIN
tests/hardware/task_sine/work/_lib1_45.qpg View File


BIN
tests/hardware/task_sine/work/_lib1_45.qtl View File


Loading…
Cancel
Save