Re: Anonymous Struct Members / Struct Constants
- From: "parag_paul@xxxxxxxxxxx" <parag_paul@xxxxxxxxxxx>
- Date: Wed, 20 Jun 2007 00:33:28 -0000
On Jun 20, 12:55 am, krustev.svi...@xxxxxxxxxxxxxx wrote:
Maybe something like this
...
wire [7:0] mask = 8'h01 << bitposition;
SFR0 |= mask; // to set a bit
SFR0 &= ~mask; // to clearit
...
bitposition could be defined in an enum which will improve your
readability.
I presume you're talking about 8 bit core with a dedicated operation
to clear/set bits in the I/O space. Because normally this is done on 3
steps read/modify/write and involves the entire register anyway, so
all the above remains simply an excercise.
Have you tried using classes .There you can have defualt members, You
can write classes in DUT by using the flags -ntb_opts dtm , I am
talking of VCS though
.
- Follow-Ups:
- Re: Anonymous Struct Members / Struct Constants
- From: Stephen
- Re: Anonymous Struct Members / Struct Constants
- References:
- Anonymous Struct Members / Struct Constants
- From: Stephen
- Re: Anonymous Struct Members / Struct Constants
- From: krustev . svilen
- Anonymous Struct Members / Struct Constants
- Prev by Date: About inputs ports sending values up
- Next by Date: Re: Carry Save Adder Verilog code needed
- Previous by thread: Re: Anonymous Struct Members / Struct Constants
- Next by thread: Re: Anonymous Struct Members / Struct Constants
- Index(es):
Relevant Pages
|