Thursday, October 11, 2018

Difference between Config_db and Factory Override

Config_db :
1. The config_db is not much more than an associative array that stores values or object handles. 
2. The keys for these associative arrays is the string name. (Important)
3. With the uvm_component class, that string name(discussed in point2) is built up into a pathname(discussed in point 4) with hierarchy. 
4. The path name when you set() a value into the config_db is matched up with the pathname you get() from the config_db.


Note: Set and get are inbuilt function and config_db is used to access the values, object handles and interfaces in top-down the hierarchy in the testbench.

Factory Registration:
1. Factory registration is similar to the uvm_config_db::set(), except that you are defining a set of static methods and properties. 
2. Instead of storing an object of the registered class type into an associative array, you are storing a proxy object that will be used to construct the registered class type. 
3. The create() method gets called to do the construction of the requested type. The create method looks up overrides using the same pathname string matching used by the config_db.
4.To summarize, we use the factory to select which class objects or their overrides(extensions) get constructed. Then you use the config_db to store and retrieve handles to objects so that they can be shared.

Note: as discussed in point 3, "factory override" provide the facility to override a class by instance or by type.

Monday, October 8, 2018

Difference between "uvm_object_utils" and "uvm_component_utils"?

The reason there are two macros is because the factory design pattern fixes the number of arguments that a constructor can have. Classes derived from uvm_object have constructors with one argument, a string name. Classes derived from uvm_component have two arguments, a name and a uvm_component parent.  The two `uvm_*utils macros inserts code that gives you a factory create() method that delegates calls to the constructors of uvm_object or uvm_component. You need to use the respective macro so that the correct constructor arguments  get passed through. This means that you cannot add extra constructor arguments when you extend these classes in order to be able to use the UVM factory.


credit : https://www.quora.com/What-is-the-difference-between-uvm_object_utils-and-uvm_component_utils-How-should-these-macros-be-used-in-a-testbench

Friday, May 18, 2018

LPWA Technologies Overview

What is LPWA?
  • Low power wide area (LPWA) technologies fill the gap between mobile (3G, LTE) and short-range wireless (eg Bluetooth, WiFi and ZigBee) networks. They are designed for machine communications, to provide connectivity for devices and applications that require low mobility and low levels of data transfer, and will therefore be critical in the development of the IoT.
  • As the name suggests, they have low power draw and provide wide area coverage. They must also be low cost in order to enable the billions of devices that will be connected in the IoT.

What is Sigfox?

  • Sigfox is a French company founded in 2009 that employs a proprietary technology and builds wireless networks to connect low-power objects such as electricity meterssmartwatches, which need to be continuously on and emitting small amounts of data.
  • Another LPWAN technology.
  • It utilizes a wide-reaching signal that passes freely through solid objects, called "ultra narrowband" and requires little energy, being termed "Low-power Wide-area network (LPWAN)".
  • The network requires a mobile operator to carry the generated traffic.[5] The signal can also be used to easily cover large areas and to reach underground objects.[6]
  • Sigfox has partnered with a number of firms in the LPWAN industry such as Texas InstrumentsSilicon Labs and ON Semiconductor.

What is NB-IOT?
  • NB-IOT stands for Narrowband IoT.
  • NB-IOT is a one of the low power wide Area Network (LPWAN) .
  • specifically developed for the Internet of Things (IoT), for devices that require small amounts of data, over long periods and indoor coverage.
  • It is a Radio technology standard developed to enable a wide range of devices and services to be connected using cellular telecommunication bands.
  • It is one of the range of Mobile IoT(MIoT) technologies standardized by 3GPP(3rd Generation Partnership Project)
  • Other 3GPP IOT tech include eMTC (enhanced Amchine type communication) EC-GSM(emhanced coverage GSM)
  • The NB-IOT spec was frozen at Release 13 of the 3GPP spec(LTE-Advance Pro) in June 2016
NB-IoT focuses specifically on indoor coverage, low cost, long battery life, and enabling a large number of connected devices.
  •   The NB-IoT technology is deployed “in-band” in spectrum allocated to Long Term Evolution (LTE), using resource blocks within a normal LTE carrier (or in the unused resource blocks within a LTE carrier
  • It is also suitable for re-framing of GSM spectrum.


What is Cordio-N NarrowBand IoT?
  • Arm Cordio-N IP for NarrowBand IoT is a full solution path that enables wide area ultra-low power connectivity the bulk of IoT devices will require.
  • The Cordio-N NarrowBand IoT solution consists of the RF and baseband hardware and corresponding software layers 1,2 and 3 specified by 3GPP release-13.
  •  It provides a highly integrated IP block together with layer control, digital front end, RF interface, and software.
  • The ultra-lightweight protocol stack solution, is designed for optimized low footprint memory and low power/low bandwidth IoT platforms, conforming to the latest 3GPP standard, and is running on Arm Cortex-M processors.
  • Cordio-N is optimized from the ground up, specifically targeting low-power and low-cost requirements.
  • Cordio radio IP is designed for optimal efficiency with systems built around the Arm Cortex-M processor series.


What is LORA?

  • LoRa is a type of modulation for IoT communications.

Source - wikipedia and other sites

Wednesday, April 18, 2018

Common Code for UVM TB (Plug and Play)

   bit ignore_uvm_error;
   uvm_report_server svr;
   final begin
      svr = uvm_report_server::get_server();
      if(svr.get_severity_count (UVM_FATAL) >0)begin
        $display("                    ***************                        ");
        $display("        ---------------            TEST-CASE FAILED                                     --------------");
        $display("                    ***************                        ");
      end else if((svr.get_severity_count(UVM_ERROR) > 0 ) && (!ignore_uvm_error))begin
        $display("                    ***************                        ");
        $display("        ---------------            TEST-CASE FAILED                                     --------------");
        $display("                    ***************                        ");
      end else begin
      //if((svr.get_severity_count (UVM_FATAL) +svr.get_severity_count(UVM_ERROR) == 0 )) begin
        $display("                    ***************                        ");
        $display("        ---------------            TEST-CASE PASSED                                     --------------");
        $display("                    ***************                        ");
      end
   end
   `ifdef WAVE_DUMP_EN
      initial begin
        static string dump_name = "wave_dump";
        if (!$value$plusargs("DUMP_NAME=%s", dump_name) ) begin
           dump_name = "wave_dump";
        end
        //$recordfile("wave_dump.trn");
        $recordfile(dump_name);
        $recordvars(tb_top);
      end
   `endif

   `ifdef USE_CUSTOM_REPORT_SRVR
     custom_report_server report_server;
     initial begin
       #0ns report_server = new();
     end
   `endif

   initial begin
     run_test();
   end
   initial begin
     set_global_timeout(`TEST_TIMEOUT);
   end
 endmodule

Monday, March 12, 2018

Some ready to use Alias for unix

alias g "gvim"
alias l "ll"
alias ll "ls -la"
alias p "pwd"
alias j "jobs"
alias k "kill %1"
alias ka "kill %1 %2 %3 %4"
alias h "history"
alias c "cd"
alias .. "cd .."
alias du "du -ch"
alias ff "find . -type f -iname"


Note - paste these alias in some source_me file or create new source_me
and use below command
source <file name>

Ethernet and more

Ethernet is a protocol under IEEE 802.33 standard User Datagram Protocol (UDP) UDP is a connectionless transport protocol. I...