OpenCores
URL https://opencores.org/ocsvn/keras_to_fpga/keras_to_fpga/trunk

Subversion Repositories keras_to_fpga

[/] [keras_to_fpga/] [trunk/] [sim/] [tests/] [tb_mnist_mlp/] [s_debug.svh] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2018 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
class s_debug extends s_anf_base #(shortreal);
29
  `uvm_object_utils(s_debug)
30
 
31
  // --------------------------------------------------------------------
32
  task body();
33
    numeric_frame #(T) f_h;
34
 
35
    // anf_api_h.put_test_pattern("constant", 1.0);
36
    // anf_api_h.put_test_pattern("constant", 2.0);
37
    // anf_api_h.put_test_pattern("constant", 3.12);
38
    // // anf_api_h.put_test_pattern("horizontal");
39
    // // anf_api_h.put_test_pattern("vertical");
40
    // // anf_api_h.put_test_pattern("random");
41
 
42
    // f_h = anf_api_h.new_frame();
43
    // f_h.a_h.set_entry('{1,0}, 1.0);
44
    // f_h.a_h.set_entry('{2,1}, 1.0);
45
    // f_h.a_h.set_entry('{3,0}, 1.0);
46
    // f_h.a_h.set_entry('{3,1}, 1.0);
47
    // anf_api_h.put_array(f_h);
48
 
49
    // f_h = anf_api_h.new_frame();
50
    // f_h.a_h.a_2d[1][0] = 1.0;
51
    // f_h.a_h.a_2d[2][1] = 1.0;
52
    // f_h.a_h.a_2d[3][0] = 1.0;
53
    // f_h.a_h.a_2d[3][1] = 1.0;
54
 
55
    // f_h = anf_api_h.new_frame();
56
    // f_h.a_h.a_2d[0][0] = 0.0;
57
    // f_h.a_h.a_2d[0][1] = 1.0;
58
    // f_h.a_h.a_2d[1][0] = 2.0;
59
    // f_h.a_h.a_2d[1][1] = 3.0;
60
    // f_h.a_h.a_2d[2][0] = 4.0;
61
    // f_h.a_h.a_2d[2][1] = 5.0;
62
    // f_h.a_h.a_2d[3][0] = 6.0;
63
    // f_h.a_h.a_2d[3][1] = 7.0;
64
 
65
    // anf_api_h.put_array(f_h);
66
 
67
    anf_api_h.load_from_file("x_test_0.raw");
68
 
69
    anf_api_h.send_frame_buffer(m_sequencer, this);
70
    #(300ns);
71
  endtask: body
72
 
73
// --------------------------------------------------------------------
74
endclass : s_debug

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.