DspPpiOutTb.v 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //`timescale 1ns / 1ps
  2. //////////////////////////////////////////////////////////////////////////////////
  3. // company:
  4. // engineer:
  5. //
  6. // create date: 16:37:06 07/11/2019
  7. // design name:
  8. // module name: dsp_linkport_interface
  9. // project name:
  10. // target devices:
  11. // tool versions:
  12. // description:
  13. //
  14. // dependencies:
  15. //
  16. // revision:
  17. // revision 0.01 - file created
  18. // additional comments:
  19. //
  20. //////////////////////////////////////////////////////////////////////////////////
  21. module DspPpiOutTb
  22. ();
  23. //================================================================================
  24. // REG/WIRE
  25. //================================================================================
  26. reg Clk_i;
  27. reg Rst_i;
  28. reg start;
  29. //================================================================================
  30. // ASSIGNMENTS
  31. //================================================================================
  32. //================================================================================
  33. // CODING
  34. //================================================================================
  35. always #10 Clk_i = ~Clk_i;
  36. initial begin
  37. Clk_i = 1'b1;
  38. Rst_i = 1'b1;
  39. start = 1'b0;
  40. #100;
  41. Rst_i = 1'b0;
  42. #100;
  43. start = 1'b1;
  44. #20;
  45. start = 1'b0;
  46. end
  47. DspPpiOut
  48. #(
  49. .ODataWidth (16),
  50. .ResultWidth (32),
  51. .ChNum (8)
  52. )
  53. MeasDataPpiOut
  54. (
  55. .Rst_i (Rst_i),
  56. .Clk_i (Clk_i),
  57. //adc1
  58. .Adc1T1ImResult_i (32'd1),
  59. .Adc1T1ReResult_i (32'd0),
  60. .Adc1R1ImResult_i (32'd1),
  61. .Adc1R1ReResult_i (32'd0),
  62. //adc2
  63. .Adc2T2ImResult_i (32'd1),
  64. .Adc2T2ReResult_i (32'd0),
  65. .Adc2R2ImResult_i (32'd1),
  66. .Adc2R2ReResult_i (32'd0),
  67. //sts data reg
  68. .ServiseRegData_i (32'd3),
  69. .LpOutStart_i (start),
  70. .LpOutClk_o (),
  71. .LpOutFs_o (),
  72. .LpOutData_o ()
  73. );
  74. endmodule