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 

unbound constructor error

 
Post new topic   Reply to topic    bluespec.com Forum Index -> Non-technical discussions and questions
View previous topic :: View next topic  
Author Message
RAMA RAJAN ATHISESHAN



Joined: 15 Jul 2011
Posts: 4

PostPosted: Sat Jul 16, 2011 4:26 am    Post subject: unbound constructor error Reply with quote

i am new to bluespec. i tried to design a IIR 2nd order filter. as first i tried to run simple assigning logic on register. I didnt use any enum in my program. when i tried to run my test bench its gives Unbound constructor error. what it means? how can i rectify this?


module mkIIRFilter (Myfilter_ifc);
Reg#(Tout) y <- mkReg(0);
Reg#(Tout) x <- mkReg(0);
Reg#(Tout) x_reg <- mkReg(0);
Reg#(Tout) x_z1 <- mkReg(0);
Reg#(Tout) x_z2 <- mkReg(0);
Reg#(Tout) y_z1 <- mkReg(0);
Reg#(Tout) y_z2 <- mkReg(0);
Reg#(Tout) y_tmp <- mkReg(0);
Reg#(Tout) m1 <- mkReg(0);
Reg#(Tout) m2 <- mkReg(0);
Reg#(Tout) m3 <- mkReg(0);
Reg#(Tout) m4 <- mkReg(0);
Reg#(Tout) m5 <- mkReg(0);

///// --------------- like that i initialised....

///////------------- in test bench,
module mkTbFilter(Empty);
Reg#(int) state <- mkReg(0);
Myfilter_ifc filter1 <- mkFilter;
////////////// ------------------------------ is it right way?

Error: "TbMyfilter.bsv", line 8, column 1: (T0007)
Unbound type constructor `Myfilter_ifc'
Typecheck finished
Back to top
View user's profile Send private message Send e-mail
hadar_agam



Joined: 10 May 2007
Posts: 38

PostPosted: Mon Jul 18, 2011 8:15 am    Post subject: Reply with quote

Hello,

The compiler is complaining that it doesn't recognize what "Myfilter_ifc" is.
Did you declare the interface, defining what methods and sub-interfaces it consists of?
If so - did you import the package with the interface declaration in your test-bench package?

Hadar
Back to top
View user's profile Send private message Visit poster's website
Neel



Joined: 13 Jun 2009
Posts: 5

PostPosted: Mon Jul 18, 2011 8:51 am    Post subject: Reply with quote

In addition to what hadar said, the syntax you have used to instantiate the filter in the test bench is also wrong.

The following would be the correct syntax:

Myfilter_ifc filter1 <- mkIIRFilter();
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bluespec.com Forum Index -> Non-technical discussions and questions All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
bluespec.com topic RSS feed 


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