bluespec.com Forum Index bluespec.com
Bluespec Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search found 5 matches
bluespec.com Forum Index
Author Message
  Topic: Interface and/or Struct Accessor Functions?
arielb

Replies: 0
Views: 8305

PostForum: Designing with BSV's Rules, Interfaces, ...   Posted: Sun Apr 26, 2009 3:38 am   Subject: Interface and/or Struct Accessor Functions?
Given a field in a struct or interface, is there a way to get 'for free' a function that extracts said field? I know I can use dots (and pattern matching for structs) with a single object, but for hig ...
  Topic: Type of value constructor?
arielb

Replies: 2
Views: 9437

PostForum: Designing with BSV's Rules, Interfaces, ...   Posted: Wed Mar 25, 2009 6:07 am   Subject: Type of value constructor?
OK, my bad =)
Thanks!
  Topic: Type of value constructor?
arielb

Replies: 2
Views: 9437

PostForum: Designing with BSV's Rules, Interfaces, ...   Posted: Sun Mar 22, 2009 7:16 am   Subject: Type of value constructor?
If I define a datatype like this:
typedef union tagged { Tuple2#(a,b) Foo; } Bar#(type a, type b);
I'd expect the constructor Foo to be typed as:
function Bar#(a,b) ...
  Topic: Function as a type; variable of function type
arielb

Replies: 4
Views: 11495

PostForum: Designing with BSV's Rules, Interfaces, ...   Posted: Thu Feb 19, 2009 5:30 pm   Subject: Function as a type; variable of function type
Note that because of SystemVerilog
syntax, the "= ?" in the definition of f is necessary: if it is omitted, the
stuff immediately after the ";" would be taken as the function bod ...
  Topic: Function as a type; variable of function type
arielb

Replies: 4
Views: 11495

PostForum: Designing with BSV's Rules, Interfaces, ...   Posted: Thu Feb 19, 2009 3:55 am   Subject: Function as a type; variable of function type
My guess would be (not tested):
function Bit#(4) test(Bit#(4) in);
function Bit#(4) r (Bit#(4) x) = (reverseBits x);
return r(in) ...
 
Page 1 of 1
All times are GMT - 4 Hours
Jump to:  
bluespec.com latest topics RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP