Register Abstraction Layer Difference Access Type

AldoT

I am writing a set of register models using uvm_reg class. Individual register size is 8-bit. Register block is created to contains those registers:

class my_reg_block extends uvm_reg_block;
  my_byte_reg reg_00;
  my_byte_reg reg_01;
  my_byte_reg reg_10;
  my_byte_reg reg_11;
  ...
  // build()
  my_map.add_reg(reg_00, 32'h0000 /*offset*/, ""RW");
  my_map.add_reg(reg_01, 32'h0001 /*offset*/, ""RW");
  my_map.add_reg(reg_10, 32'h0002 /*offset*/, ""RW");
  my_map.add_reg(reg_11, 32'h0003 /*offset*/, ""RW");
  ...

I have a register adapter that will translate read/write into bus transaction. So, I am able to do this inside my sequence:

reg_00.write(status, 'hff, .parent(this));

The bus transaction will do write to that specific register: reg_00.

My problem is that the bus has byte_enable that allow it to write accross 4 register in double-word access. Using the existing register model above, is it possible to write/read in 4 register at the same time? Or do I need to create another set of registers (with 32-bit size)? It would be something like this pseudo-code:

{reg_11,reg_10,reg_01,reg_00}.write(status, 'hffffffff, .parent(this));

Any suggestion?

Meir

you could try passing additional information like byte_enable to the adapter using the extension argument in the write function. Then the adapter can decide accordingly if this is a legal double word transaction and assign the bus transaction fields accordingly. see partial example below

virtual function uvm_sequence_item reg2bus(const ref uvm_reg_bus_op rw);
bus_trans            trans;
uvm_reg_item            item;
regtrans_params         params;


item                    = get_item();
trans                   = bus_trans::type_id::create("trans");

if(item.extension == null) 
  `uvm_fatal("", "item.extension==null !!")
if(!$cast(params, item.extension))
  `uvm_fatal("", "FAILED $cast(params, item.extension) !!")

trans.dst_chip_addr              = params.chip_addr;

in the sequence:

block.reg_00.write(status, 32'hfffffffff .extension(params));

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Difference between register() and @ComponentScan

What is the difference between abstraction and encapsulation?

Reading mails using Spring email abstraction layer

What's the difference between abstraction and encapsulation?

Difference between Encapsulation and Abstraction

How to use generics in an arbitrary abstraction layer?

Javascript - Create Iterable Abstraction Layer

Design pattern: C++ Abstraction Layer

Is there a standard abstraction for this request-response type?

Docker - ERROR: failed to register layer: symlink

Type abstraction in GHC Haskell

How to convert raw SQL query into Silverstripe SQLQuery abstraction layer

Does an SQL Database return a type, or does the Database Abstraction Layer perform implicit casting? (Propel and php)

React-Native - Creating abstraction layer for AsyncStorage

Is it possible to use polymorphism with an abstraction layer for different widgets in Flutter?

What is the difference between Abstraction and Inheritance?

STM32F446xx Peripheral Register Access Difference Between Using Dereferenced Pointers and Structs

Docker failed to register layer mongo

What's the difference between abstraction and generalization?

In drupal should I use content-types or database abstraction layer?

Using an abstraction layer over DbContext

Abstraction layer between Controller and View

Register Access in C++

Additonal layer of abstraction for GNU screen region management?

Difference between Data abstraction and procedural abstraction in java

Additional layer of abstraction for asynchronous operations

Dynamic switching of implementation in hardware abstraction layer (HAL)

No enclosing instance of type 'Abstraction' is accessible

Behind the abstraction, how does the third parameter (or next(), typically) work behind the abstraction layer in ExpressJS?

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    pump.io port in URL

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  14. 14

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  15. 15

    How to use merge windows unallocated space into Ubuntu using GParted?

  16. 16

    flutter: dropdown item programmatically unselect problem

  17. 17

    Pandas - check if dataframe has negative value in any column

  18. 18

    Nuget add packages gives access denied errors

  19. 19

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  20. 20

    Generate random UUIDv4 with Elm

  21. 21

    Client secret not provided in request error with Keycloak

HotTag

Archive