[uvmdvgen] Fixes from #1441

- Fixed the base_seq template to override the REQ type to the correct
type

Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_alert_rsp_seq.sv b/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_alert_rsp_seq.sv
index 38418c3..9fa4b5b 100644
--- a/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_alert_rsp_seq.sv
+++ b/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_alert_rsp_seq.sv
@@ -14,7 +14,7 @@
 
   virtual task body();
     `uvm_info(`gfn, $sformatf("starting alert receiver transfer"), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = alert_esc_seq_item::type_id::create("req");
     start_item(req);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
         r_alert_ping_send == 0;
diff --git a/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_seq.sv b/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_seq.sv
index ff6522e..3d9d8b4 100644
--- a/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_seq.sv
+++ b/hw/dv/sv/alert_esc_agent/seq_lib/alert_receiver_seq.sv
@@ -15,7 +15,7 @@
 
   task body();
     `uvm_info(`gfn, $sformatf("starting alert receiver transfer"), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = alert_esc_seq_item::type_id::create("req");
     start_item(req);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
         r_alert_ping_send == 1;
diff --git a/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_ping_rsp_seq.sv b/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_ping_rsp_seq.sv
index 2f661b8..4a75450 100644
--- a/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_ping_rsp_seq.sv
+++ b/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_ping_rsp_seq.sv
@@ -14,7 +14,7 @@
 
   virtual task body();
     `uvm_info(`gfn, $sformatf("starting alert receiver transfer"), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = alert_esc_seq_item::type_id::create("req");
     start_item(req);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
         s_alert_send     == 0;
diff --git a/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_seq.sv b/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_seq.sv
index 2ffc836..938512c 100644
--- a/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_seq.sv
+++ b/hw/dv/sv/alert_esc_agent/seq_lib/alert_sender_seq.sv
@@ -14,7 +14,7 @@
 
   task body();
     `uvm_info(`gfn, $sformatf("starting alert sender transfer"), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = alert_esc_seq_item::type_id::create("req");
     start_item(req);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
         s_alert_send     == 1;
diff --git a/hw/dv/sv/alert_esc_agent/seq_lib/esc_receiver_esc_rsp_seq.sv b/hw/dv/sv/alert_esc_agent/seq_lib/esc_receiver_esc_rsp_seq.sv
index 9324ac3..247b67f 100644
--- a/hw/dv/sv/alert_esc_agent/seq_lib/esc_receiver_esc_rsp_seq.sv
+++ b/hw/dv/sv/alert_esc_agent/seq_lib/esc_receiver_esc_rsp_seq.sv
@@ -14,7 +14,7 @@
 
   virtual task body();
     `uvm_info(`gfn, $sformatf("starting escalator receiver transfer"), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = alert_esc_seq_item::type_id::create("req");
     start_item(req);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
         r_esc_rsp == 1;
diff --git a/hw/dv/sv/uart_agent/seq_lib/uart_seq.sv b/hw/dv/sv/uart_agent/seq_lib/uart_seq.sv
index decae23..aca254d 100644
--- a/hw/dv/sv/uart_agent/seq_lib/uart_seq.sv
+++ b/hw/dv/sv/uart_agent/seq_lib/uart_seq.sv
@@ -21,7 +21,7 @@
 
   task body();
     `uvm_info(`gfn, $sformatf("starting uart rx byte xfer seq: 0x%0h", data), UVM_HIGH)
-    req = REQ::type_id::create("req");
+    req = uart_item::type_id::create("req");
     start_item(req);
     req.stop_bit_c.constraint_mode(0);
     `DV_CHECK_RANDOMIZE_WITH_FATAL(req,
diff --git a/util/uvmdvgen/base_seq.sv.tpl b/util/uvmdvgen/base_seq.sv.tpl
index e3f523d..bc4eea9 100644
--- a/util/uvmdvgen/base_seq.sv.tpl
+++ b/util/uvmdvgen/base_seq.sv.tpl
@@ -3,6 +3,7 @@
 // SPDX-License-Identifier: Apache-2.0
 
 class ${name}_base_seq extends dv_base_seq #(
+    .REQ         (${name}_item),
     .CFG_T       (${name}_agent_cfg),
     .SEQUENCER_T (${name}_sequencer)
   );
diff --git a/util/uvmdvgen/base_test.sv.tpl b/util/uvmdvgen/base_test.sv.tpl
index e1a6f83..1a7a5a2 100644
--- a/util/uvmdvgen/base_test.sv.tpl
+++ b/util/uvmdvgen/base_test.sv.tpl
@@ -7,8 +7,8 @@
 % else:
 class ${name}_base_test extends dv_base_test #(
 % endif
-    .ENV_T(${name}_env),
-    .CFG_T(${name}_env_cfg)
+    .CFG_T(${name}_env_cfg),
+    .ENV_T(${name}_env)
   );
 
   `uvm_component_utils(${name}_base_test)
diff --git a/util/uvmdvgen/base_vseq.sv.tpl b/util/uvmdvgen/base_vseq.sv.tpl
index 4278bfc..218c18d 100644
--- a/util/uvmdvgen/base_vseq.sv.tpl
+++ b/util/uvmdvgen/base_vseq.sv.tpl
@@ -7,8 +7,8 @@
 % else:
 class ${name}_base_vseq extends dv_base_vseq #(
 % endif
-    .CFG_T               (${name}_env_cfg),
     .RAL_T               (${name}_reg_block),
+    .CFG_T               (${name}_env_cfg),
     .COV_T               (${name}_env_cov),
     .VIRTUAL_SEQUENCER_T (${name}_virtual_sequencer)
   );