Monday, January 24, 2011

VHDL 360, Modeling Finite State Machines (FSMs)

  • What is a FSM?
  • State Machine
  • Moore FSM
  • Moore Implementation
  • Mealy FSM
  • Mealy Implementation
  • FSM in VHDL
  • Next State Logic
  • Current State Logic
  • Assigning Moore Outputs
  • Assigning Mealy Outputs
  • Moore vs. Mealy
  • FSM Tips
  • Example
  • Exercise 1: Simple Control Unit
  • State Machine Encoding
  • Exercise 2: Traffic Light Controller

Sunday, January 23, 2011

uCOS-III VS uCOS-II (Conventions)

Introduction
This is the third post out of five posts under the same topic. In the first post, I pointed out the difference in features. In the second post, I summed up the difference between the two kernels in terms of file names and contents. In this post, I will summarize changes in the conventions. They can be summarized into 3 categories.

Introduction of CPU.H
A notable change is the use of the CPU specific data types. In uCOS-II, data types were defined in OS_CPU.H. In uCOS-III, these definitions are defined in CPU.H. Every data type is prefixed with "CPU_".

Exceptions are OS_STK and OS_CPU_SR, they are renamed to CPU_STK and CPU_SR respectively.

In addition, in uCOS-II we had the OS_STK_GROWTH changed to CPU_CFG_STK_GRWOTH in uCOS-III and stored in CPU.H.

Introduction of "CFG" as Acronym
This is another convention added to define configuration options

Introduction of OS_CFG_APP.H
Some configuration options are configurable at the application level not at the kernel level as the case of uCOS-II. The application programmer only needs to define them during his application compilation rather than being defined in uCOS-II compilation which might not be accessible by the application programmer. These options plus new ones are defined in the OS_CFG_APP.H.

This file now contains configurations for maximum number of messages, ISR stack, idle tasks, ISR handler task, statistics task, ticks, and timers.

A notable change in these configurations that the word "TICKS_PER_SEC" is now replaced by "RATE_HZ". Frankly speaking, it became less confusing!

Changes in OS_CFG.H
The remaining configurations in OS_CFG.h are either renamed, moved, or removed. Additional configurations are added to that file. These modification are summarized as follows:
  • DEBUG is replaced with DBG
  • Naming configurations are removed as in uCOS-III objects are named during creation.
  • In uCOS-III, all kernel objects are allocated during run-time. All configurations related to maximum number of objects are removed. This is really aids saving RAM and is not necessary to over allocate objects.
  • Width of event flags is determined in uCOS-III by the data type OS_FLAG defined in OS_TYPE.H instead of OS_FLAG_NBITS used in uCOS-II.
  • No query services are available in uCOS-III. All query configurations are removed.
  • Accept functionality is now emulated in pend functionality through an option. All accept configurations are removed.
  • Different posting functionality are now combined in a single post functionality. Extra posting configurations are removed.
  • All configuration to support uC/OS-View are removed. This product is obsolete.

Friday, January 14, 2011

VHDL 360, Synthesis Examples

  • Introduction
  • Synthesize and Learn
  • Combinational Logic
  • Latch Inference
  • Sequential Logic
  • Flip-flop Interference

Thursday, January 13, 2011

VHDL 360, Data Types and Operators Continued

  • Operators
  • Operators Precedence
  • Logical Operators
  • Addition Operators
  • Relational Operators
  • Shift Operators
  • Multiplication Operators
  • Miscellaneous Operators
  • Aggregate
  • Attributes

Tuesday, January 11, 2011

VHDL 360, Synthesis Using ISE

  • New Project
  • Project Setting
  • Import Files to ISE
  • Synthesize Design Unit
  • View RTL
  • Synthesis Report

Sunday, January 2, 2011

VHDL 360, Data Types and Operators

  • Data Types
  • Scalar Types
  • Composite Types
  • Exercise 1: Modeling a 16x16 ROM Memory
  • Exercise 2: Modeling 1024x8 RAM Memory