Sponsored Content
Top Forums Programming Bitwise operation for state machine Post 302880880 by anand.shah on Tuesday 24th of December 2013 07:06:13 AM
Old 12-24-2013
Here are the macros :-
Code:
#define INA_SAVE_APP_STATE(STATE)  appState = (appState | STATE); 
#define INA_GET_APP_STATE() appState

The problem with above macro is that when i switch from
Code:
state1

to
Code:
state3

; state variable becomes
Code:
xxxx x101

that means both
Code:
state1

and
Code:
state3

are active where as what I want is when I switch from
Code:
state1

to
Code:
state3

state variable should be
Code:
xxxx x100

meaning only
Code:
state3

is active
 

2 More Discussions You Might Find Interesting

1. AIX

Open firmware state to running state

Hi Admins, I am having a whole system lpar in open firmware state on HMC. How can I bring it to running state ? Let me know. Thanks. (2 Replies)
Discussion started by: snchaudhari2
2 Replies

2. Shell Programming and Scripting

Vim function to generate RTL Code(finite state machine) in verilog

Hi I wanted to call the AutoFsm function (given below) in vim to generate a code something like: **********verilog code to generate ************* always @(posedge clk or negedge rst_n) begin if(!rst_n) begin state_r <= #1 next_stateascii_r; ... (0 Replies)
Discussion started by: dll_fpga
0 Replies
pstatectl(1M)															     pstatectl(1M)

NAME
pstatectl - control processor performance states SYNOPSIS
cpu] pstate| interval] DESCRIPTION
The command is used to control processor performance states (P-states). On systems with supported processors and firmware, processor per- formance states can reduce power consumption. A supported processor implements a series of performance states, numbered from P0 to Pn, where n is implementation dependent. Each subse- quent P-state consumes less power but offers less performance than the previous state. provides access to both static and dynamic performance state usage modes. In static mode, the system remains in a specified P-state, where power consumption and performance are reduced by a fixed amount. In dynamic mode, HP-UX will adjust the processors' P-states individually, in response to the workload running on the system. Enabling dynamic processor performance states will generally have a negligible effect on system performance, while at the same time reduc- ing power consumption when the system is not fully loaded. Options recognizes the following options: The operation will apply to the specified processor only. If is not specified, the operation applies to the whole system. The "status" operation will report detailed status for each processor. Otherwise, a summary of the system state is reported. Operands recognizes the following operands; only one operand at a time can be specified on the command line: Enable the dynamic P-states mode (processors will adjust performance to match the workload). Disable the P-states (processors will always be at maximum performance). Enable static mode (processors will always be in the specified P-state). If the specified state is higher than is supported, the highest supported state is used instead. The state may be specified as a number, or in P-state notation (for example, P0). Enable dynamic P-states mode within the range of states specified. and should be supplied as specified under the option. Report information about the system's P-state capabilities, the current P-state mode (static or dynamic), and whether HP-UX has control over processor P-states. If was speci- fied, each processor's current P-state and operating mode are displayed. Display a table listing the power consumption and relative performance of each P-state. Print the number of the highest implemented P-state on the system. If the system does not support P-states, the number is 0. Change the time interval between dynamic mode state changes to the specified duration. The minimum is 0.01 seconds, and the maximum is 600 seconds. EXTERNAL INFLUENCES
On some systems, the Onboard Administrator may take control of P-states away from the operating system (for instance, when iLO is used to place the system in Static High Performance or Static Low Power mode). If HP-UX does not have control over processor performance states, the command will still work normally. However, any changes made to P-state modes will have no effect until HP-UX regains control. The command will report whether HP-UX currently has control over P-states. RETURN VALUE
returns the following values: Successful completion. Command failed. DIAGNOSTICS
Make sure that the system has Itanium(R) 2 9100 series or later processors, and that the installed system firmware supports P- states. EXAMPLES
To enable dynamic P-states on the system: To disable dynamic P-states on the system (all processors will be in maximum performance mode): or To restrict the system to P0 and P1 only: DEPENDENCIES
Processor performance states require Itanium(R) 2 9100 series processors or later models. Some systems require a firmware update to use processor performance states. AUTHOR
was developed by HP. SEE ALSO
(Itanium(R)-based Systems Only) pstatectl(1M)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy