Jump to content

wasim6691

Members
  • Content count

    35
  • Joined

  • Last visited

About wasim6691

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. HI I am trying to debug the SystemC Code on Visual Studio 2017 . I need help while debugging in x64 Platform, It does not work for me. Even through I have perform the mandatory setting to debug in x64 platform. Can anybody explain me the detailed settings regarding debugging in x64 platform. I would be highly thankful
  2. wasim6691

    TOP MODULE LOOPING

    I mean for Example I have two Modules A and B. Once I use sc_start() command. Simulation runs only once and thread dies. But I want to keep the simulation run x times before getting the thread dead. Thats why In the Top module I am trying something to solve this. If You understand my question then let me know.Please or I should elaborate more. Thanks
  3. wasim6691

    TOP MODULE LOOPING

    I am running this loop in the constructor of the top module but I as the values i want to vary for the re-run of the simulation. How to restart the simulation with new set of values. I have instantiated this top module in the main and calling sc_start() command from there. help me Thanks
  4. wasim6691

    TOP MODULE LOOPING

    Hi I am defining the input ports at the top module which will be the input ports also to all the sub-modules. But these input ports have to change the value as I have to run the for loop for multiple layers. Where exactly I have to run this for loop in the TOP MODULE. Whether i have to a make a process inside the top Module but then I will not be able to change the values of my ports. Thanks. The loop is given as: for (int layer_id = 0; layer_id < 27; layer_id++) { net_CFG = get_network_config(); layer_t layer = net_CFG->layers[layer_id]; dimension_t w_in = layer.width; // 256 First Layer dimension_t h_in = layer.height; // 256 channel_t chi = layer.channels_in; // 3 channel_t cho = layer.channels_out; // 64 stride_t s = layer.stride; // 2 kernel_t k = layer.kernel; width.write(w_in); height.write(h_in); chin.write(chi); chout.write(cho); stride.write(s); kernel_value.write(k); }
  5. wasim6691

    TOP MODULE LOOPING

    Hi I am defining the input ports at the top module which will be the input ports also to all the sub-modules. But these input ports have to change the value as I have to run the for loop for multiple layers. Where exactly I have to run this for loop in the TOP MODULE. Whether i have to a make a process inside the top Module but then I will not be able to change the values of my ports. Thanks. The loop is given as: //for (int a = 0; a < num_layers - 26; a++){ // Only for First Layer // switch (a){ // case 0: // width = 256; // height = 256; // chin = 3; // chout = 64; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 1792 // // First Layer Weight Values = 1792 - 64 = 1728 sc_in<sc_uint<10>> width_in; sc_in<sc_uint<10>> height_in; sc_in<sc_uint<10>> chin_in; sc_in<sc_uint<10>> chout_in; sc_in<sc_uint<10>> kerenl_in; // break; // case 1: // width = 128; // height = 128; // chin = 64; // chout = 16; // kernel_1 = 3; // num_weights = chout * chin* kernel_1 * kernel_1 + chout; // 1792 + 9232 = 11024 sc_in<sc_uint<10>> width_in; sc_in<sc_uint<10>> height_in; sc_in<sc_uint<10>> chin_in; sc_in<sc_uint<10>> chout_in; sc_in<sc_uint<10>> kerenl_in; // break; // case 2: // width = 64; // height = 64; // chin = 16; // chout = 64; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 11024 + 1088 = 12112 sc_in<sc_uint<10>> width_in; sc_in<sc_uint<10>> height_in; sc_in<sc_uint<10>> chin_in; sc_in<sc_uint<10>> chout_in; sc_in<sc_uint<10>> kerenl_in; // break; // case 3: // width = 64; // height = 64; // chin = 16; // chout = 64; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 12112 + 9280 = 21392 sc_in<sc_uint<10>> width_in; sc_in<sc_uint<10>> height_in; sc_in<sc_uint<10>> chin_in; sc_in<sc_uint<10>> chout_in; sc_in<sc_uint<10>> kerenl_in; // break; // case 4: // width = 64; // height = 64; // chin = 128; // chout = 16; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 21392 + 2064 = 23456 // sc_in<sc_uint<10>> width_in; sc_in<sc_uint<10>> height_in; sc_in<sc_uint<10>> chin_in; sc_in<sc_uint<10>> chout_in; sc_in<sc_uint<10>> kerenl_in; break; // case 5: // width = 64; // height = 64; // chin = 16; // chout = 64; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 23456 + 1088 = 24544 // break; // case 6: // width = 64; // height = 64; // chin = 16; // chout = 64; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 24544 + 9280 = 33824 // break; // case 7: // width = 64; // height = 64; // chin = 128; // chout = 32; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 33824 + 36896 = 70720 // break; // case 8: // width = 32; // height = 32; // chin = 32; // chout = 128; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 70720 + 4224 = 74944 // break; // case 9: // width = 32; // height = 32; // chin = 32; // chout = 128; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;//74944 + 36992 = 111936 // break; // case 10: // width = 32; // height = 32; // chin = 256; // chout = 32; // kernel_1 = 1; // num_weights = chout * chin* kernel_1 * kernel_1 + chout;//111936 + 8224 = 120160 // break; // case 11: // width = 32; // height = 32; // chin = 32; // chout = 128; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;//120160 + 4224 = 124384 // break; // case 12: // width = 32; // height = 32; // chin = 32; // chout = 128; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;//124384 + 36992 = 161376 // break; // case 13: // width = 32; // height = 32; // chin = 256; // chout = 64; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;//161376 + 147520 = 308896 // break; // case 14: // width = 16; // height = 16; // chin = 64; // chout = 256; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 308896 +16640 = 325536 // break; // case 15: // width = 16; // height = 16; // chin = 64; // chout = 256; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 325536 + 147712 = 473248 // break; // case 16: // width = 16; // height = 16; // chin = 512; // chout = 64; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 473248 + 32832 = 506080 // break; // case 17: // width = 16; // height = 16; // chin = 64; // chout = 192; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 506080 + 12480 = 518560 // break; // case 18: // width = 16; // height = 16; // chin = 64; // chout = 192; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 518560 + 110784 = 629344 // break; // case 19: // width = 16; // height = 16; // chin = 384; // chout = 112; // kernel_1 = 3; // num_weights = chout * chin* kernel_1 * kernel_1 + chout; //629344 + 387184 = 1016528 // break; // case 20: // width = 8; // height = 8; // chin = 112; // chout = 256; // kernel_1 = 1; // num_weights = chout * chin* kernel_1 * kernel_1 + chout;//1016528 + 28928 = 1045456 // break; // case 21: // width = 8; // height = 8; // chin = 112; // chout = 256; // kernel_1 = 3; // num_weights = chout * chin* kernel_1 * kernel_1 + chout;// 1045456 + 258304 = 1303760 // break; // case 22: // width = 8; // height = 8; // chin = 512; // chout = 112; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;//1303760 + 57456 = 1361216 // break; // case 23: // width = 8; // height = 8; // chin = 112; // chout = 368; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 1361216 + 41584 = 1402800 // break; // case 24: // width = 8; // height = 8; // chin = 112; // chout = 368; // kernel_1 = 3; // num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 1402800 + 371312 = 1774112 // break; // case 25: // width = 8; // height = 8; // chin = 736; // chout = 512; // kernel_1 = 1; // num_weights = chout * chin * kernel_1 * kernel_1 + chout; // 1774112 + 377344 = 2151456 // break; // case 26: // width = 8; // height = 8; // chin = 736; // chout = 512; kernel_1 = 1; num_weights = chout * chin * kernel_1 * kernel_1 + chout;// 2151456 + 377344 = 2528800 break; default: break; } THE ABOVE SC_IN PORTS WILL BE DEFINED IN ALL THE CASES :
  6. wasim6691

    using sc_vector to Pass an Array between Modules

    Hi Maehne I want to pass 16 vectors over these 16 ports. Let's say each vector A1[9], A2[9]............ A16[9] on each of these 16 ports. thanks. For one array value, i can use x.write() or x.read commands. but I want to pass vectors on each of the ports. I can use pointers but If there is any other way to pass vectors through ports that would be so nice of you to guide me. thanks
  7. wasim6691

    using sc_vector to Pass an Array between Modules

    Hi David, I have to define 16 ports of sc_vector<sc_out<sc_uint<4>>> some-vector ; and pass the array elements in parallel through those 16 ports between the Modules. std::vector I do know but for my case I have to dedicate 16 ports at the MODULE A and 16 ports at the MODULE B to make the access of array elements in parallel. i am defining my vector as described in bold but need help how to pass array. Thanks
  8. Hi I have to use the sc_vector command to pass an array let's say Array[16][16] between the modules. Kindly can you tell me how to write the input side vector at the MODULE A and output side vector at the MODULE B to pass this array. I am beginner and donot know how to use the sc_vector command. Thanks
  9. Hi, I want to run the diagram given below. I am executing the modules with the respective processes but it only execute once and then the loop dies. I am providing the static sensitivity to the processes inside the modules e.g. sensitive<< sig1; and so on. How to make the execution multiple times as mentioned in the STEPS in the Diagram. I need help in running the STEPS multiple times before we proceed to the next step in System C code. Thanks
  10. Hi I am running the Sequence of Modules in the flow like: 1) Memory Module 2) Data fetching to the Weight and Image_Cache Modules 3) Processing_PIXEL_MODULE and so on. But I wanted to go back from Processing_pixel_Module to the Image_Cache Module for Cache refill. Can You help me that how can I achieve this. I wanted to go back to the Image_Cache Module to refill the Cache from the Memory module. thanks.
  11. I have defined a floating point array of 2528800 elements using Malloc( I will use new operator now). Now I am reading the array element through TLM_READ_COMMAND. It read the values correctly until 500 elements and then it stops reading further values and displaying no error message at all. Is that a memory problem or memory limitation problem?
  12. Hi The TLM_READ_COMMAND IS NOT READING THE DATA ARRAY COMPLETELY. What can be the possible reason. I have allocated an array through malloc command in the memory module. and Then from the second module i am trying to read that array using the TLM_READ_COMMAND but the array is not being read completely and it stops in the mid somewhere. Just not running any further without showing any error. What can be possible reason for this . Thanks
  13. Hi David In the memory module if use Dynamic Allocation for the Array then TLM transfer from one Module to Another Works. Otherwise TLM transfer does not work if just define the array like : mem[ i ] = data; where 0< i < 2528800. It may also cause stack overflow problem. Is dynamic Allocation for SHARED DRAM Memory ok ? Thanks. What Is meant by use MEMBER DATA for the memory ?
  14. Hi I have to load a floating point data from the binary file and save it in an array inside the MODULE_1 (Memory) and then I wanted to transfer the content of that array from MODULE_1 to Another MODULE_2 (CACHE) through TLM. Can You guide me how to save an array in MODULE_1 (Memory) and transfer the floating point data to another MODULE_2 (Cache) through TLM. I am trying to read the data from CACHE to MEMORY but TLM_GENERIC_PAYLOAD does not access the correct memory address of the array elements to read from and therefore I am just reading some garbage value. A help through sample code is much appreciated. Thanks
  15. wasim6691

    Notify() Using Event Between Two modules

    And The MODULE-1(producer) and MODULE-2(consumer) are different Classes in my code. they are not the processes within one MODULE
×