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

Friday, December 31, 2010

VHDL 360, Write More Complex Models Continued

  • While Loop
  • For Loop
  • Exercise 1: Serial In Parallel Out
  • Wait Statement
  • Conversion Functions
  • Lab 1.a: Write the Code for a Fibonacci Sequence
  • Lab 1.b: Write the Code for Knight Rider LEDs

uCOS-III VS uCOS-II (File Names and Contents)

Introduction
This is the second post out of five under the same topic. In the first post in the comparison, I pointed out the difference in features. In this post, I will point the difference in file names and contents in both kernels. Difference can be summed up to 13.

Changes in File Names and Contents
1- os_app_hooks.c is added to uCOS-III for convenience so the user can add application hooks. Copy this file to the application directory and edit the contents of the file.
2- os_cfg_app.h is added to uCOS-III. In old uCOS-II, all configurations were stored in os_cfg.h. In uCOS-III, application specific configurations are moved from os_cfg.h to os_cfg_app.h.
3- os_cfg_r.h used in uCOS-II as a starting point for configuring the kernel is now changed to os_cfg.h in uCOS-II. The new file is reserved for configuring non-application specific kernel features.
4- Porting files are the same but some variables and function names are changed.
  • OSIntNesting to OSIntNestingCtr
  • OSTCBCur to OSTCBCurPtr
  • OSTCBHighRdy to OSTCBHighRdyPtr
  • OSInitHookBegin to OSInitHook
  • OSTaskStatHook to OSStatTaskHook
  • OSTaskIdleHook to OSIdelTaskHook
  • OSInitHookEnd and OSTCBInitHook are removed
  • OSTaskStkInit in the new kernel has different arguments. Instead of taking the task's stack start address, it takes the task's stack size and its stack base address. This implies a slight change in this function code in uCOS-III.
5- os_dbg.c is a must in uCOS-III compared to its counter part, os_dbg_r.c, in uCOS-II.
6- os_int.c is added to uCOS-III to support the new feature called interrupt queuing in uCOS-III. This feature allows posting calls from ISRs to be deferred to a task level handler. The goal behind this feature is to reduce interrupt latency.
7- os_pend_multi.c is added to uCOS-III to allow tasks to pend on multiple kernel objects. The old code was written in os_core.c in uCOS-II.
8- os_prio.c is added to uCOS-III to isolate the code that determines the highest priority task ready to run. A port developer can re-implement this file in assembly equivalent if this will improve the performance.
9- A message mailbox is simply a message queue with one entry. That's why the file os_mbox.c is no longer available in uCOS-II.
10- os_msg.c is added to uCOS-III to encapsulate the management of messages in message queues.
11- os_stat.c is added to uCOS-III to extract the statistics task code from os_core.c.
12- os_type.h is added to uCOS-III. This file is used to adapt the data types sizes to the cpu architecture rather than being assumed by the port developer as in uCOS-II.
13- os.h is added to uCOS-III to act as the main header file and replace ucos_ii.h in uCOS-II.

Friday, December 17, 2010

VHDL 360, Simulation Using ModelSim

  • Command Line Simulation
  • Compile and Simulate
  • Add Signals to Wave
  • Applying Inputs
  • Run Simulation
  • Make Files
  • Interactive Simulation

VHDL 360, Write More Complex Models

  • Statements
  • Process Description
  • Sequential Assignments
  • Data Objects
  • Objects Scope
  • Data Objects Example
  • Skills Check
  • Case Statement
  • Exercise 1: 2x4 by Decoder
  • If Statement
  • Exercise 2: D FF with Synchronous Reset
  • Exercise 3: Simple Comparator

Monday, October 4, 2010

uCOS-III VS uCOS-II (Features)

Introduction
Migrating from uCOS-II to uCOS-III was a humming question in my head and the heads of many. I started trying to answer this question with the idea that uCOS-III is totally a new kernel but with roots into uCOS-II. My survey is based on uCOS-II source code and the Win32 for uCOS-III evaluation I got recently.

Differences between uCOS-III and uCOS-II can be classified under 5 categories:
  1. Features
  2. Source file names and contents
  3. Conventions
  4. Variable names
  5. API changes
These areas are of great importance for those who are willing to port uCOS-II applications to uCOS-III.

I will try to explain briefly each category in a separate post.

If any of my results are not accurate enough due to the lackness of uCOS-III source code, please feel free to email me at amraldo@hotmail.com to correct it in this post.

Changes in Features
uCOS-III is introduced in 2009 while uCOS-II was first introduced in 1998. For both kernels, books and source code are available. But for uCOS-III, Micrium followed a new model. The source code is made available only to licensed users.

Unlike uCOS-II, uCOS-III has no limitation on numbers of tasks (255 tasks mazimum in uCOS-II) nor on the number of tasks at each priority level. Consequently, RR scheduling was introduced in uCOS-III.

uCOS-III kept all services available except for the message mailbox. It was totally removed. Although a message mail box can be used exactly like a binary semaphore, in addition for message passing, but after all it is indeed a message queue with a single entry. Another breakthrough is that mutexes and task's suspension resumption now support nesting.

Advances in performance were considered in the design of uCOS-III compared to uCOS-II. Smaller code size, support for run-time configurability, less interrupt latency, enhanced built-in measurements, time stamping on posting APIs, optimize schedulers in assembly are dreams coming into reality.

uCOS-III is working on being a safety-critical certified software. It is compliant with
MISRA C 2004 (except for 8 rules) and the certificaion is in progress to achieve DO178B Level A, EUROCAE ED-12B, SIL3/SIL4, and IEC 61508.