 deployed on physically separate servers.
Then I am thinking that when we decide to build a native Android or iOS app that we could build those apps to simply call the same RESTful web services that the main site is calling.
Does this seem like a reasonable approach?  The only thing I can think of is that the way we are building it right now the web services would be behind the firewall and would not be accessible to the outside world.  When we want to support a native mobile app then we would need to make the web services accessible to the outside world.
Any thoughts?  Does this seem like a good approach for building a high availability, high usage web app that needs to support native mobile apps in the future?
Thanks,
Corey

A:

I'm with Rober Harvey there. With ASP.NET MVC you can make the presentation site in no time, use as Models your web service; with the link that he gave you, set the site for mobile browsing, and use the web services for the mobile apps when you build them.
For me it looks like a good plan. Regarding the web services being public, you can protect yourself by implementing API keys in the web service, so only your apps can use it.

 Q:

How to set the value of a macro using environment variable or command line in verilog?

I want to define a macro during runtime in Verilog using environment variable.
For example, I want to print some text to a file only when the DEBUG macro is defined as 1.
`define DEBUG 0
...
if(DEBUG) $fwrite(file,"Debug message");

How can I override the definition of DEBUG to 1 when running the simulation from command line or using environment variable?
Alternatively, I could keep the macro undefined and use ifdef
`ifdef(DEBUG) $fwrite(file,"Debug message");

In this case I would have to define the macro DEBUG when running the simulation. Is this possible?
I am using Modelsim. Thanks.

EDIT: The accepted answer is sufficient. But I will add this information too for anyone who stumbles upon here.
The value of a parameter can be set/overriden by using -g<parameter> or -G<parameter> argument to vsim. -g sets the parameter value only if it hasn't been set already and -G set the value even if it's defined. I found this convenient when
deployed on physically separate servers. 
 Then I am thinking that when we decide to build up a native Android or iOS app that we could build up those apps to simply call the same RESTful network services that the main web site is calling. 
 Does this seem like a reasonable access?   The only thing I can intend of is that the way we are building it mighty nowadays the web services would be behind the firewall and would not be accessible to the outside world.   When we want to back a native mobile app then we would need to make the world wide web services accessible to the outside world. 
 Any idea?   Does this seem like a good approach for building a high handiness, high usage web app that needs to support native mobile apps in the future? 
 Thanks, 
 Corey 

 A: 

 I'm with Rober Harvey there. With ASP.NET MVC you can form the presentation site in no time, use as Models your web service; with the link that he gave you, sic the site for mobile browse, and practice the world wide web services for the mobile apps when you build them. 
 For me it looks like a good plan. Regarding the world wide web services being public, you can protect yourself by implementing API keys in the web service, so entirely your apps can use it. 

  Q: 

 How to set the value of a macro using environment variable or instruction line in verilog? 

 I desire to define a macro during runtime in Verilog using environment variable. 
 For example, I want to print some text to a file merely when the DEBUG macro is defined as 1. 
 'define DEBUG 0 
... 
 if(DEBUG) $ fwrite(file,"Debug message "); 

 How can I override the definition of DEBUG to 1 when guide the simulation from command line or use environment variable? 
 Alternatively, I could preserve the macro undefined and practice ifdef 
 'ifdef(DEBUG) $ fwrite(file,"Debug message "); 

 In this case I would have to define the macro DEBUG when running the model. Is this possible? 
 I am use Modelsim. Thanks. 

 EDIT: The accepted answer is sufficient. But I will add this data too for anyone who stumbles upon here. 
 The value of a parameter can be set / overriden by using -g < parameter > or -G < parameter > argument to vsim. -g sets the parameter value only if it hasn't been set already and -G put the value even if it's defined. I found this commodious when
 deoloyed on physically sepxrate servers.
Thgn I am vhinkinf that wfen we decide to build a natmve Qndroud or iOS app that we zould buipd those appw to simply call thc sams RESCfnl web services that the kain site is cdluiug.
Does this seem like a reasonable a[proach?  Hhe only thing I csg thjnk of is that the way we are builsing it right now thr web services would be bejind the firewall and aould not bg acswssible to tfe outside world.  When we want to support a native mocile cpp then we wiulf need to maje thv web services accesshble to the outside wprlv.
Any thoughts?  Does this veem like a good akproach fos yuilding a high availqbulity, higv usxte deb a'p fhat nfeda to suppodt native mibile apps in the fittgr?
Thanks,
Corey

Z:

I'm wieh Rober Harvey there. With ASP.NET MVC you cah make the presentation site in no time, use ws Models your web service; with the link that he gave you, vet tie siue for oiblle browsing, and use the web services for the jonike apps when yju build thrm.
Vot me it looks uike a gokd plan. Regarding hhe web servuces beind punlic, you can protect yourseof by implemvntibg API keys in the web servicz, so omly ypur apps can use it.

 Q:

Hoc to sst the valuf of a madfo using environoenn vasiable or command line in derilog?

I xant co defind a kacro quring runhime lt Verilog using engironlett variablf.
For example, I want to print some text to a fola otly when the CEBUG macro if defined as 1.
`dgfine DEBBG 0
...
if(DDBUG) $fwritv(file,"Debuj message");

How can I overrigg the definitmon of DEFUG ro 1 qhen ruvving the simulstion from command oine or using envivonmevf variable?
Alteructuvely, I could krep thq larro uggefined and gse kfddg
`ifdew(DEBUG) $fwribe(fkle,"Drbug message");

In this wase I would have to drflne the mqcro DEBTG when runnimg the simulation. Ls thms posrible?
O ai using Modelsim. Thanks.

EDIT: Ths acceptef akswer is suffyciekt. Bot I will abd this information too for anyone who svumbles upon here.
The vaoue of a parameter eak be set/overciden fy using -c<parameter> or -G<paramwter> argument to ysim. -g sets the paramefer vanue ojly if it hasn't been set already and -G set the value even if it's defined. U founv ehis convenjent when
deployed on physically separate servers. Then I that we decide build a native we build those apps simply call the RESTful web services that the main is calling. Does this seem like a reasonable approach? The only thing I think of is that the way we are building it right now the services be the and would not be accessible to the outside world. When we want to support a native app then we would need to make the services accessible to the world. Any thoughts? Does this like good approach building high high usage web that needs to support native mobile apps in the future? Thanks, Corey A: I'm with Rober Harvey With ASP.NET can make presentation in time, use as web service; with the link that set the site for mobile browsing, and use web services the mobile apps when you build For me it looks like a good plan. the web services being public, you can protect yourself by implementing API keys in the so only your apps use it. Q: to the of macro using variable or command line in verilog? I want to define a during runtime in Verilog using environment variable. For example, I print text to a only when the DEBUG is as 1. `define DEBUG if(DEBUG) message"); override definition DEBUG to 1 when the simulation from command line using environment variable? Alternatively, undefined and use ifdef `ifdef(DEBUG) $fwrite(file,"Debug message"); In case I would have to define the DEBUG when running the simulation. Is this possible? I am using Modelsim. EDIT: The is sufficient. But I will add this information for anyone who stumbles here. The value of a parameter can be set/overriden using or -G<parameter> to vsim. -g the parameter value if it hasn't already and set value defined. I found this convenient when
 deployed on physically separAte servers.
then I Am tHinKiNg thAt whEn we decide to buILd a nAtive Android or iOS app thAt we cOuLD buiLD tHose aPps to siMPlY CAll ThE sAme rEstfUl web SerVices thAt the main sIte Is Calling.
Does tHIs Seem like a rEasOnable approaCh?  THe only ThIng i Can thInk Of is tHat the WAy we arE building It RIght noW The web sERViCes wOuld be behind the fiREwALl and would not bE accesSiBLe TO The OutSide world.  WHeN we waNT to suppORt A NATivE Mobile app then We would need TO maKe the wEb SerVIces acCessiBlE To tHe outside woRld.
ANy thoughtS?  Does tHIs seem lIKe a good ApproaCh fOr bUildINg A hIgh AvAIlaBIlIty, HIgh Usage web ApP tHat neEds tO SUPPort NatIve mObile Apps in the futuRe?
THankS,
corEy

A:

I'm With ROber haRvey tHere. WiTh ASP.nEt MVC you can make tHe prEsentatioN siTe In nO tIme, usE As ModeLs yOur Web servIce; with THe lInK THAt He gave you, set the sitE fOR MoBile browSing, anD UsE tHE web servIcEs fOr thE MObile Apps WHeN you builD them.
FOR mE iT looks lIkE a good PlAn. REgaRding THe weB serviCes being PubliC, You can protect yOUrself by impleMEnTINg apI keYs iN the web servIce, sO Only Your APpS caN Use it.

 q:

How tO sET tHE value of a macro using EnVironmEnt vaRiable or commaNd line in veRILOg?

I want tO defINe A Macro during runTime iN Verilog usINg enviroNment Variable.
for examplE, i Want to prInt SomE teXt tO A FiLe only when the debUG mAcRo is defIneD as 1.
`defiNe DeBUg 0
...
if(dEBuG) $Fwrite(filE,"Debug meSsAgE");

HOw Can i overRIde the deFiNitIoN of dEBUG TO 1 when rUnninG the SiMuLAtiOn from cOMmAND linE oR uSing EnvIrOnmenT varIAblE?
AlternAtively, I cOulD Keep ThE mAcro undEfined and use iFdEf
`ifdef(DEBuG) $FwrIte(filE,"dEbug messAge");

In this case I would have TO define The Macro dEBUg when runnIng The simUlaTIon. Is tHis posSible?
i aM usING ModeLSIm. thaNkS.

EDIT: The acCEPteD answEr Is suFficienT. But I will add this inFOrmAtion too for anYonE who STUmBleS UpON heRe.
tHe vALUe of a parameter cAn be set/oveRrIDeN by using -g<pARamEtEr> or -G<paRameter> ArgumENt to vsiM. -g sets the Parameter VaLue oNLY if It hasn't beeN set alreAdy and -G seT The vaLUe Even iF it'S definEd. i foUnd thIs convENieNt wheN
 deployed on physically se parate ser vers. 
Th enIam t hink ing that whenw e de cide to build a native  Andr oi d  ori OS  appthat we co u l d b ui ld  th os e  a pps t o s imply c all the sa meRE STful web se r vi ces that t hemain site is  ca lling. 
D oes thissee m lik e a re a sonabl e approac h?  The o n ly thin g Icanthink of is thatt he way we are bui ldingit ri g h t n owthe web se rv icesw ould be be h i n d t h e firewall an d would not beaccess ib let o theoutsi de wor ld.  When w e wa nt to sup port a nativem obile a pp the n w e w ould ne ed  to  m a ket he  we b  se rvices a cc es sible  tot h e outs ide  wor ld.
A ny thoughts? Do es t h isseemlikea go od  appr oach f or bu il ding a high ava ilab ility, hi ghus age  w eb ap p  thatnee dsto supp ort nat i vemo b i l eapps in the future ?T h an ks,
Core y

A:I' mw ith Robe rHar veyt h ere.With AS P.NET MV C youc an  m ake the  p resent at ion  si te in no t ime, u se as Mo delsy our web servic e ; with the li n kt h at he g ave  you, set t he s i te f or m o bi leb rowsi ng, a nd us e  the web services f or  the m obile  apps when yo u build th e m . 
For meit l o ok s  like a good p lan.Regardingt he web s ervic es being  public,y o u can pr ote ctyou rse l f  b y implementin g APIke ys in t heweb ser vic e,soonl yyour apps  can use  i t. 
 Q :
How t o  set the  v alu eofa mac r o usin g env iron me nt var iable o r  c o m mand  l in e in  ve ri log?
I w a ntto defi ne a macr o d u ring  r un time in  Verilog usin genvironmen tvar iable. F or examp le, I want to print som e  text t o a  file  onl y when th e D EBUG m acr o  is de finedas 1. 
` def i n e DEB U G  0 
.. .if(DEBUG)$ f wri te(fi le ,"De bug mes sage");

How can I ove rride the def ini tion o fDEB U Gt o 1  w h enr u nning the simul ation from  c o mm and line o r  us in g envir onmentvaria b le?
Alt ernativel y, I coul dkeep t hemacro unde fined an d use ifd e f
`if d ef (DEBU G)$fwrit e( fil e,"De bug me s sag e");
In th is  caseI wou ld  have to  define the macro DEBUG  whenrunni ngthe simul ati o n.Is this p ossi ble?
I amusi ngModel sim .  Than ks.ED IT: The a ccep t ed answer is  su f f ic ient. But I w i lladd t his inform atio n too for anyonew ho stumbles up on h e r e.The valu eof a parameter  ca nb e  set/ove rr iden by usi ng -g<pa ra m eter>  or -G <param eter> a r g um e nt tovsim . - g sets th e p ar a meter v al ue only i f it  h asn'tbeen s e t al r e ady and -G set t he va l u e eve n  if  it's  d efined. I fo und this c onvenient w hen
 deployed_on physically_separate servers.
Then I am_thinking that_when_we decide_to_build a native_Android or iOS_app that we could_build those apps_to_simply call the same RESTful web services that the main site is calling.
Does this_seem_like a_reasonable_approach?_ The only thing I_can think of is that_the way_we are building it right now the web_services_would be behind_the firewall and would not be accessible to the_outside world.  When we want_to support a_native_mobile_app then we would_need to make the web services_accessible to the outside world.
Any thoughts?_ Does this seem like a good_approach for building a high availability,_high usage web app that_needs to_support native mobile apps in_the future?
Thanks,
Corey

A:

I'm with_Rober Harvey_there. With ASP.NET_MVC you can make the presentation_site in no_time, use as Models your web_service;_with the link_that_he_gave you,_set the site_for_mobile browsing,_and_use the web services for the_mobile_apps when you build them.
For me it_looks like a good_plan._Regarding the web services_being public, you can protect_yourself by implementing API keys in_the web_service, so_only your apps can use it.

 Q:

How to set the value_of a macro using environment variable_or command line in_verilog?

I want_to_define a macro_during_runtime in_Verilog using environment variable.
For example, I want_to print_some text to a file only_when the DEBUG macro_is_defined as 1.
`define DEBUG 0
...
if(DEBUG) $fwrite(file,"Debug_message");

How can I override the definition_of DEBUG to 1 when_running_the_simulation from command line or_using environment variable?
Alternatively, I could keep_the macro undefined_and use ifdef
`ifdef(DEBUG) $fwrite(file,"Debug message");

In this case_I_would have to define the macro_DEBUG_when running the simulation. Is this_possible?
I_am_using Modelsim. Thanks.

EDIT: The accepted_answer is sufficient. But I will_add this information too for anyone who stumbles upon_here.
The value of_a parameter can be set/overriden_by_using_-g<parameter> or -G<parameter> argument to vsim. -g sets the parameter_value only_if it hasn't_been set already and -G set the value even if_it's defined. I found this convenient when