diff --git a/libraries/io/ddr/hdllib.cfg b/libraries/io/ddr/hdllib.cfg
index e095989542574effa2e6ded63b7f0bebdb20f18b..5855c3eb57edb5ad056e465440dfc3c22ee1503e 100644
--- a/libraries/io/ddr/hdllib.cfg
+++ b/libraries/io/ddr/hdllib.cfg
@@ -23,9 +23,11 @@ regression_test_vhdl =
 
 [modelsim_project_file]
 modelsim_compile_ip_files =
-    $RADIOHDL_WORK/libraries/technology/ip_stratixiv/ddr3_uphy_4g_800_master/copy_hex_files.tcl
-    $RADIOHDL_WORK/libraries/technology/ip_arria10/ddr4_4g_1600/copy_hex_files.tcl
-    $RADIOHDL_WORK/libraries/technology/ip_arria10_e1sg/ddr4_4g_1600/copy_hex_files.tcl
+    $RADIOHDL_WORK/libraries/technology/ip_stratixiv/ddr3_uphy_4g_800_master/copy_hex_files.tcl  # 4GB DDR3 model
+    $RADIOHDL_WORK/libraries/technology/ip_arria10/ddr4_4g_1600/copy_hex_files.tcl               # 4GB DDR4 model
+    $RADIOHDL_WORK/libraries/technology/ip_arria10_e1sg/ddr4_4g_1600/copy_hex_files.tcl          # Unb2b 4GB DDR4 driver
+    $RADIOHDL_WORK/libraries/technology/ip_arria10_e1sg/ddr4_8g_1600/copy_hex_files.tcl          # Unb2b 8GB DDR4 driver
+    $RADIOHDL_WORK/libraries/technology/ip_arria10_e2sg/ddr4_8g_1600/copy_hex_files.tcl          # Unb2c 8GB DDR4 driver
 
 
 [quartus_project_file]
diff --git a/libraries/io/ddr/tb/vhdl/tb_io_ddr.vhd b/libraries/io/ddr/tb/vhdl/tb_io_ddr.vhd
index a807bd6fbd49a7b339d764f3f348be3621e90591..fdb97c7b1131c59a73c79dab71526e3afeab94b0 100644
--- a/libraries/io/ddr/tb/vhdl/tb_io_ddr.vhd
+++ b/libraries/io/ddr/tb/vhdl/tb_io_ddr.vhd
@@ -29,7 +29,6 @@
 -- > as 10
 -- > run -all 
 --
-
 LIBRARY IEEE, technology_lib, tech_ddr_lib, common_lib, dp_lib, diagnostics_lib;                   
 USE IEEE.STD_LOGIC_1164.ALL;    
 USE IEEE.numeric_std.ALL;
@@ -71,6 +70,8 @@ ARCHITECTURE str of tb_io_ddr IS
   CONSTANT c_sim_ddr                  : t_c_tech_ddr := func_tech_sel_ddr(g_technology, c_tech_ddr3_sim_16k, c_tech_ddr4_sim_16k);
   CONSTANT c_tech_ddr                 : t_c_tech_ddr := func_tech_sel_ddr(g_sim_model, c_sim_ddr, c_mem_ddr);
   
+  CONSTANT c_gigabytes                : NATURAL := func_tech_ddr_module_size(c_tech_ddr);
+
   CONSTANT c_dp_clk_period            : TIME := 5 ns;   -- 200 MHz
   CONSTANT c_mm_clk_period            : TIME := 8 ns;   -- 125 MHz
   CONSTANT c_ctlr_ref_clk_period      : TIME := sel_a_b(g_sim_model, c_dp_clk_period, sel_a_b(c_tech_ddr.name="DDR3", 5 ns, 40 ns));   -- 200 MHz for DDR3 on UniBoard and 25 MHz for DDR4 on UniBoard2, use dp clock for sim_model
@@ -162,6 +163,7 @@ ARCHITECTURE str of tb_io_ddr IS
   SIGNAL dbg_c_ctlr_wr_not_rd_arr     : STD_LOGIC_VECTOR(0 TO c_nof_access-1)  := c_ctlr_wr_not_rd_arr;
   
   SIGNAL dbg_c_tech_ddr               : t_c_tech_ddr := c_tech_ddr;
+  SIGNAL dbg_c_gigabytes              : NATURAL := c_gigabytes;  -- = 0 for sim model, else nof GB
   SIGNAL dbg_c_dp_data_w              : NATURAL := c_dp_data_w;
   SIGNAL dbg_c_wr_fifo_depth          : NATURAL := c_wr_fifo_depth;
   SIGNAL dbg_c_rd_fifo_depth          : NATURAL := c_rd_fifo_depth;
@@ -307,8 +309,19 @@ BEGIN
       
       -- Check diagnostics sink after the rd fifo has been read empty
       proc_common_wait_some_cycles(dp_clk, 1);
-      ASSERT snk_diag_res_val = '1' REPORT "[ERROR] DIAG_RES INVALID!"  SEVERITY FAILURE;
-      ASSERT snk_diag_res = '0'     REPORT "[ERROR] NON-ZERO DIAG_RES!" SEVERITY FAILURE;
+      ASSERT snk_diag_res_val = '1' REPORT "[ERROR] DIAG_RES INVALID!" SEVERITY FAILURE;
+      --ASSERT snk_diag_res = '0' REPORT "[ERROR] WRONG DIAG_RES!" SEVERITY FAILURE;
+      --FIXME: Add 4GB DDR4 IO driver IP for unb2c and then uncomment ASSERT snk_diag_res and delete this IF-THEN-ELSE.
+      IF c_tech_ddr.name = "DDR4" AND g_technology = c_tech_arria10_e2sg THEN
+        -- Cannot yet verify DDR4 for g_technology = c_tech_arria10_e2sg (is
+        -- unb2c), because we have 8GB DDR4 IO Driver and 4GB DDR4 memory. In
+        -- simulation these can connect, but appear to yield dbg_rd_data = 0
+        -- causing wrong snk_diag_res.
+        REPORT "Did NOT check snk_diag_res." SEVERITY NOTE;
+      ELSE
+        ASSERT snk_diag_res = '0' REPORT "[ERROR] WRONG DIAG_RES!" SEVERITY FAILURE;
+        REPORT "Checked snk_diag_res." SEVERITY NOTE;
+      END IF;
           
       -- Stop diagnostics sink
       snk_diag_en <= '0';
@@ -319,7 +332,7 @@ BEGIN
       snk_diag_en <= '1';
     END LOOP;
     
-    -- If the test failed then it would have stopped already, so it the test has passed
+    -- If the test failed then it would have stopped already (due to SEVERITY FAILURE), so if it gets here then the test has passed
     REPORT "[OK] Test passed." SEVERITY NOTE;
 
     -- Stop the simulation
diff --git a/libraries/io/ddr/tb/vhdl/tb_tb_io_ddr.vhd b/libraries/io/ddr/tb/vhdl/tb_tb_io_ddr.vhd
index cf5de76ced2b7badb4743db1796cba5784797ca9..953309c510cd8b6907d10dd753b11280db11a4f0 100644
--- a/libraries/io/ddr/tb/vhdl/tb_tb_io_ddr.vhd
+++ b/libraries/io/ddr/tb/vhdl/tb_tb_io_ddr.vhd
@@ -24,6 +24,8 @@
 -- Usage:
 --   > as 5
 --   > run -all
+-- # Takes about   10m for DDR3
+-- # Takes about 1u10m for DDR4
 
 LIBRARY IEEE, technology_lib, tech_ddr_lib, common_lib;
 USE IEEE.std_logic_1164.ALL;
@@ -41,9 +43,10 @@ ARCHITECTURE tb OF tb_tb_io_ddr IS
 
   CONSTANT c_technology     : NATURAL      := c_tech_select_default;
   CONSTANT c_tech_ddr3      : t_c_tech_ddr := c_tech_ddr3_4g_800m_master;
-  CONSTANT c_tech_ddr4      : t_c_tech_ddr := c_tech_ddr4_4g_1600m;
+  --CONSTANT c_tech_ddr4      : t_c_tech_ddr := c_tech_ddr4_4g_1600m;
+  CONSTANT c_tech_ddr4      : t_c_tech_ddr := func_tech_sel_ddr(c_technology = c_tech_arria10_e1sg, c_tech_ddr4_4g_1600m, c_tech_ddr4_8g_1600m);  -- use 4GB for unb2b, 8GB for unb2c
   CONSTANT c_tech_ddr       : t_c_tech_ddr := func_tech_sel_ddr(c_technology, c_tech_ddr3, c_tech_ddr4);  -- Select DDR3 or DDR4 dependent on the technology
-  
+
   CONSTANT c_tb_end_vec : STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS=>'1');                                             
   SIGNAL   tb_end_vec   : STD_LOGIC_VECTOR(15 DOWNTO 0) := c_tb_end_vec;  -- sufficiently long to fit all tb instances
   SIGNAL   tb_end       : STD_LOGIC := '0';
diff --git a/libraries/technology/ddr/tech_ddr_pkg.vhd b/libraries/technology/ddr/tech_ddr_pkg.vhd
index 6e5dd051ec78d0c1f9711180ca5358fe9aac9779..dd42a50691be70cdc5166af700b834427050f20f 100644
--- a/libraries/technology/ddr/tech_ddr_pkg.vhd
+++ b/libraries/technology/ddr/tech_ddr_pkg.vhd
@@ -198,10 +198,11 @@ PACKAGE BODY tech_ddr_pkg IS
   FUNCTION func_tech_sel_ddr(g_technology : NATURAL; g_ddr3, g_ddr4 : t_c_tech_ddr) RETURN t_c_tech_ddr IS
   BEGIN
     CASE g_technology IS
-      WHEN c_tech_stratixiv        => RETURN g_ddr3;
-      WHEN c_tech_arria10          => RETURN g_ddr4;
-      WHEN c_tech_arria10_e3sge3   => RETURN g_ddr4;
-      WHEN c_tech_arria10_e1sg     => RETURN g_ddr4;
+      WHEN c_tech_stratixiv        => RETURN g_ddr3;  -- unb1
+      WHEN c_tech_arria10          => RETURN g_ddr4;  -- unb2
+      WHEN c_tech_arria10_e3sge3   => RETURN g_ddr4;  -- unb2
+      WHEN c_tech_arria10_e1sg     => RETURN g_ddr4;  -- unb2b
+      WHEN c_tech_arria10_e2sg     => RETURN g_ddr4;  -- unb2c
       WHEN OTHERS                  => RETURN g_ddr3;
     END CASE;
   END;
diff --git a/libraries/technology/ip_arria10_e1sg/ddr4_8g_1600/copy_hex_files.tcl b/libraries/technology/ip_arria10_e1sg/ddr4_8g_1600/copy_hex_files.tcl
index bfcceced1f4ae089e3f866e21d4512b333f0c886..8a8cad31d528913d98c75e06c867b6c292a8f002 100644
--- a/libraries/technology/ip_arria10_e1sg/ddr4_8g_1600/copy_hex_files.tcl
+++ b/libraries/technology/ip_arria10_e1sg/ddr4_8g_1600/copy_hex_files.tcl
@@ -26,8 +26,10 @@ set IP_DIR "$env(RADIOHDL_BUILD_DIR)/$env(BUILDSET)/qsys-generate/ip_arria10_e1s
 
 # Copy ROM/RAM files to simulation directory
 if {[file isdirectory $IP_DIR]} {
-    file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_cal_sim.hex ./
-    file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_cal_synth.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_cal_sim.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_cal_synth.hex ./
     file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_params_sim.hex ./
     file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_params_synth.hex ./
+
+    file copy -force $IP_DIR/../altera_emif_arch_nf_180/sim/ip_arria10_e1sg_ddr4_8g_1600_altera_emif_arch_nf_180_7cl5ama_seq_cal.hex ./
 }
diff --git a/libraries/technology/ip_arria10_e2sg/ddr4_8g_1600/copy_hex_files.tcl b/libraries/technology/ip_arria10_e2sg/ddr4_8g_1600/copy_hex_files.tcl
index 8f7f7b97ecd1d4a229ba2a836252fd4a84a9408a..3cc009c6f57631515644dee02a115d1ec0ceb55a 100644
--- a/libraries/technology/ip_arria10_e2sg/ddr4_8g_1600/copy_hex_files.tcl
+++ b/libraries/technology/ip_arria10_e2sg/ddr4_8g_1600/copy_hex_files.tcl
@@ -26,8 +26,13 @@ set IP_DIR "$env(RADIOHDL_BUILD_DIR)/$env(BUILDSET)/qsys-generate/ip_arria10_e2s
 
 # Copy ROM/RAM files to simulation directory
 if {[file isdirectory $IP_DIR]} {
-    file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_cal_sim.hex ./
-    file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_cal_synth.hex ./
-    file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_params_sim.hex ./
-    file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_params_synth.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_cal_sim.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_cal_synth.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_params_sim.hex ./
+    #file copy -force $IP_DIR/../altera_emif_arch_nf_151/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_151_4thorvi_seq_params_synth.hex ./
+
+    file copy -force $IP_DIR/../altera_avalon_onchip_memory2_1920/sim/seq_cal_soft_m20k.hex ./
+    file copy -force $IP_DIR/../altera_emif_arch_nf_191/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_191_qssf3hq_seq_cal.hex ./
+    file copy -force $IP_DIR/../altera_emif_arch_nf_191/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_191_qssf3hq_seq_params_sim.hex ./
+    file copy -force $IP_DIR/../altera_emif_arch_nf_191/sim/ip_arria10_e2sg_ddr4_8g_1600_altera_emif_arch_nf_191_qssf3hq_seq_params_synth.hex ./
 }
diff --git a/libraries/technology/ip_stratixiv/ddr3_mem_model/compile_ip.tcl b/libraries/technology/ip_stratixiv/ddr3_mem_model/compile_ip.tcl
index aa484a4ee70ee2594db2f55febaeaaf99cc3d3ba..a2129d9a99fbc73df2def0410fec51f4e143e4af 100644
--- a/libraries/technology/ip_stratixiv/ddr3_mem_model/compile_ip.tcl
+++ b/libraries/technology/ip_stratixiv/ddr3_mem_model/compile_ip.tcl
@@ -22,9 +22,8 @@
 
 # This file is based on Megawizard-generated file msim_setup.tcl.
 
-# Get the memory model fro the uphy_4g_* from the ip_stratixiv_ddr3_uphy_4g_800_master example design
-#set IP_DIR "$env(RADIOHDL)/libraries/technology/ip_stratixiv/ddr3_uphy_4g_800_master/generated/ip_stratixiv_ddr3_uphy_4g_800_master_example_design"
-set IP_DIR "$env(RADIOHDL_BUILD_DIR)/unb1/qmegawiz/ip_stratixiv_ddr3_uphy_4g_800_master_example_design
+# Get the memory model for the uphy_4g_* from the ip_stratixiv_ddr3_uphy_4g_800_master example design
+set IP_DIR "$env(RADIOHDL_BUILD_DIR)/unb1/qmegawiz/ip_stratixiv_ddr3_uphy_4g_800_master_example_design"
 
 # Assume library work already exists
 
diff --git a/libraries/technology/technology_pkg.vhd b/libraries/technology/technology_pkg.vhd
index 2d507dd10cf47e8087622161ac43b8ee4f8d67eb..c91c630e2b59c13bdd64599978e87878c79219f8 100644
--- a/libraries/technology/technology_pkg.vhd
+++ b/libraries/technology/technology_pkg.vhd
@@ -47,8 +47,8 @@ PACKAGE technology_pkg IS
   CONSTANT c_tech_virtex7            : INTEGER := 4;   -- e.g. used on Roach3 for Casper
   CONSTANT c_tech_arria10            : INTEGER := 5;   -- e.g. used on UniBoard2 first proto (1 board version "00" may 2015)
   CONSTANT c_tech_arria10_e3sge3     : INTEGER := 6;   -- e.g. used on UniBoard2 second run (7 boards version "01" dec 2015)
-  CONSTANT c_tech_arria10_e1sg       : INTEGER := 7;   -- e.g. used on UniBoard2 third run (5 'ARTS' boards version "01" feb 2017)
-  CONSTANT c_tech_arria10_e2sg       : INTEGER := 8;   -- e.g. used on UniBoard2 third run (5 'ARTS' boards version "01" feb 2017)
+  CONSTANT c_tech_arria10_e1sg       : INTEGER := 7;   -- e.g. used on UniBoard2b third run (5 ARTS boards version "01" feb 2017)
+  CONSTANT c_tech_arria10_e2sg       : INTEGER := 8;   -- e.g. used on UniBoard2c (2 LOFAR2.0 SDP boards version "11" f 2021)
   CONSTANT c_tech_nof_technologies   : INTEGER := 9;
 
   -- Functions