Thursday, December 04, 2008     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: How to get user input in OCEAN?
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
julian2007
Posts: 13
Online: User is Offline
7/10/2008 3:23 AM  
Hi, there:

    I would like to get user input from and then use that to determine what to do next, I have tried gets() and scanf(). Neither of them seems work well. Below is what I have tried.
        gets(p)
           or
        scanf("%s" s)

Thanks In Advance.
adbeckett
Posts: 248
Online: User is Offline
7/14/2008 10:13 PM  
I'd probably use a form instead. For example:

procedure(abCreateOceanForm()
    let((temp high)
	temp=hiCreateFloatField(
	    ?name 'temp
	    ?value 27.0
	    ?prompt "Temperature"
	    )
	high=hiCreateFloatField(
	    ?name 'high
	    ?value 5.0
	    ?prompt "High Voltage"
	    )
	hiCreateAppForm(
	    ?name 'abOceanForm
	    ?formTitle "Set OCEAN Parameters"
	    ?fields
		list(
		    list(temp 0:0 400:30 100)
		    list(high 0:30 400:30 100)
		    )
	    ?callback 'abOceanFormCB
	    ) ; hiCreateAppForm
	) ; let
    ) ; procedure
	
procedure(abOceanFormCB(form)
    temp(form->temp->value)
    desVar("high" form->high->value)
    run()
    selectResults('tran)
    plot(v("/a") v("/b"))
    ; display form again? - this makes sure it is not
    ; called directly from the callback to avoid us getting too
    ; nested
    hiRegTimer("abDisplayOceanForm()" 0)
    ) ; procedure

procedure(abDisplayOceanForm()
    unless(boundp('abOceanForm)
	abCreateOceanForm())
    hiDisplayForm(abOceanForm)
    ) ; procedure

procedure(abSetupSimulation()
    simulator('spectre)
    design("./simulation/rcac/spectre/schematic/netlist/netlist")
    analysis('tran ?stop 200n)
    ; turn off info and warnings
    option(?categ 'analog 'info "no")
    option(?categ 'analog 'warn "no")
    ; display my form to ask the user to set variables/temperature
    abDisplayOceanForm()
    )
If you then call abSetupSimulation(), it will do part of the OCEAN setup, then launch a form to ask the user for further information before running the simulation. It then brings up the form again to ask the user if he wants to run another simulation with different parameters.

Regards,

Andrew.

julian2007
Posts: 13
Online: User is Offline
7/15/2008 1:56 AM  
Thank you! Andrew. Very helpful indeed.
I'll try it.
Posting to forums is available to community members only.
Login or Register

Forums > Custom IC > Shared code - SKILL > How to get user input in OCEAN?


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.