2006年10月11日星期三

彩色命令行

又一次读到关于Console Color的文章,决定把以前的积累合在一起贴出来。

今天看见这个: http://www.linuxjournal.com/article/8603

以前,还有些积累:

[ANSI颜色的表示]
可以参考color文件夹下的程序和两个网页文件。

[改变ls的颜色]
偶然发现了ls命令中目录的颜色和链接的颜色相同,都变成了浅蓝色。
在/etc/DIR_COLORS文件中对ls命令显示结果中不同类型的对象定义了颜色。
另外,在每个帐户$HOME目录下,还可以定义自己的 .dir_colors文件替代使用系统默认文件。

[RGB色彩]
在/usr/lib/X11/rgb.txt文件中有详细定义。运行xcolor命令显示颜色名称。

[字体]
通过xlsfonts命令查看全部字体。通过xfontsel选择字体。

#!/bin/bash
# Show all ANSI colors
#
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white

esc="33["
echo -n " _ _ _ _40 _ _ _ 41_ _ _ _42 _ _ _ 43"
echo "_ _ _ 44_ _ _ _45 _ _ _ 46_ _ _ _47 _"
for fore in 30 31 32 33 34 35 36 37; do
line1="$fore "
line2=" "
line3=" "
line4=" "
for back in 40 41 42 43 44 45 46 47; do
line1="${line1}${esc}${back};${fore}m Normal ${esc}0m"
line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m"
line3="${line3}${esc}${back};${fore};4m Unsc ${esc}0m"
line4="${line4}${esc}${back};${fore};5m Blnk ${esc}0m"
done
echo -e "$line1n$line2n$line3n$line4n"
done

找回丢失的GRUB

很久前写的,存过来。


问题描述

  • 双系统(Linux + Windows)使用GRUB引导的情况,当重新安装Windows后,由于MBR被重写,造成GRUB丢失。

  • 以下分别列出两种解决方法。

使用安装光盘或者linux启动盘:

  1. 用安装光盘或者linux启动盘启动,然后在启动的提示符输入:linux rescue

  2. 按照提示进入一个Shell状态,/mnt/sysimage/目录挂载了已存在的linux的/分区.

  3. 将根分区变为当前目录的根分区:chroot /mnt/sysimage

  4. 使用fdisk -l 显示当前分区情况,然后使用#grub-install /dev/hdx(x为安装硬盘,如hda)

  5. 使用exit推出chroot,再使用exit退出linux rescue模式,系统将重新启动!取出光盘,应该可以看到grub安装好了。在具体的环境中,编辑/boot/grub/grub.conf文件和menu.lst文件

使用grub启动盘:

  1. 用grub启动盘启动,按c键进入grub命令行模式。

    • grub> find /boot/vmlinuz       (查找系统中的内核文件的位置)
      (hd0,0)
      grub> find /vmlinuz (如果你采用了单独的 boot 分区, 那么需要用来查找。假定找到的结果是)
      (hd0,1)
      grub> find /sbin/init (再查找系统中有哪些根分区)
      (hd0,0)
      grub>cat (hd0,0) /root/grub/grub.conf (不一定要做,仅仅为了看启动参数)
      grub>root (hd0,1)
      grub>kernel (hd0,0) /boot/vmlinuz-2.4.18-11 ro root=/dev/hda2 (启动内核)
      grub>initrd (hd0,0) /boot/initrd-2.4.18-11.img
      grub>boot

      (!) 在grub命令行中可以使用Tab键

  2. 由此可以引导进入已装的linux系统,进入系统后,在shell行中输入命令grub,进入grub命令行模式

    • grub> boot
      grub>root (hdX,Y)
      grub>setup (hd0)

      这里的X,如果是一个盘,就是0,如果你所安装的linux的根分区在第二个硬盘上,那X就是1了;Y,就是装有linux系统所在的根分区。常用setup (hd0)GRUB写到硬盘的MBR上。

      如果成功会有一个successful......

2006年9月17日星期日

Big-endian & Little-edian Detecting

A sample illustrate the differences between Big-endian and Little-endian:

Consider the number 1025 (2 to the tenth power plus one) stored in a 4-byte integer:

00000000 00000000 00000100 00000001
AddressBig-Endian representation of 1025 Little-Endian representation of 1025
00
01
02
03
00000000
00000000
00000100
00000001
00000001
00000100
00000000



A simple program for endianess detecting:

#include <stdio.h>

int main()
{
int x=1;
if (*((char *)&x)==1)
printf("Little endian.\n");
else
printf("Big endian.\n");

return 0;
}

More about endianess, referer to wikipedia/Endianness

2006年9月13日星期三

Blogsport 有一个自由入口

今天刚刚看到 http://www.pkblogs.com/
绕过GFW封锁

网络广告的计费方式和名词解释

1.CPM(Cost Per Mille,或者Cost Per Thousand;Cost Per Impressions) 每千人成本

 网上广告收费最科学的办法是按照有多少人看到你的广告来收费。按访问人次收费已经成为网络广告的惯例。CPM(千人成本)指的是广告投放过程中,听到或者 看到某广告的每一人平 均分担到多少广告成本。传统媒介多采用这种计价方式。在网上广告,CPM取决于“印象”尺度,通常理解为一个人的眼睛在一段固定的时间内注视一个广告的次 数。比如说一个广告 横幅的单价是1元/CPM的话,意味着每一千个人次看到这个Ban-ner的话就收1元,如此类推 ,10,000人次访问的主页就是10元。至于每CPM的收费究竟是多少,要根据以主页的热门程度(即浏览人数)划分价格等级,采 取固定费率。国际惯例是每CPM收费从5美元至200美元不等。

 2.CPC(Cost Per Click;Cost Per Thousand Click-Through) 每点击成本

 以每点击一次计费。这样的方法加上点击率限制可以〖WX)〗加强作弊的难度,而且是宣传网站站点的最优方式。但是,此类方法就有不少经营广告的网站觉得不 公平,比如,虽然浏览者没有点击,但是他已经看到了广告,对于这些看到广告却没有点击的流量来说,网站成 了白忙活。有很多网站不愿意做这样的广告,据说,是因为传统媒体从来都没有这样干过。

 3.CPA(Cost Per Action) 每行动成本

CPA 计价方式是指按广告投放实际效果,即按回应的有效问卷或定单来计费,而不限广告投 放量。CPA的计价方式对于网站而言有一定的风险,但若广告投放成功,其收益也比CPM的计 价方式要大得多。  广告主为规避广告费用风险,只有当网络用户点击旗帜广告,链接广告主网页后,才按点击 次数付给广告站点费用。

 4.CPR(Cost Per Response) 每回应成本

以 浏览者的每一个回应计费。这种广告计费充分体现了网络广告“及时反应、直接互动、准 确记录”的特点,但是,这个显然是属于辅助销售的广告模式,对于那些实际只要亮出名字 就已经有一半满足的品牌广告要求,大概所有的网站都会给予拒绝,因为得到广告费的机会 比CPC还要渺茫。

 5.CPP(Cost Per Purchase) 每购买成本

广告主为规避广告费用风险,只有在网络用户点击旗帜广告并进行在线交易后,才按销售笔 数付给广告站点费用。

无论是CPA还是CPP,广告主都要求发生目标消费者的“点击”,甚至进一步形成购买,才予 付费:CPM则只要求发生“目击”(或称“展露”、“印象”),就产生广告付费。

 6.包月方式

 很多国内的网站是按照“一个月多少钱”这种固定收费模式来收费的,这对客户和网站都不 公平,无法保障广告客户的利益。虽然国际上一般通用的网络广告收费模式是CPM(千人印象 成本)和CPC(千人点击成本),但在我国,一个时期以来的网络广告收费模式始终含糊不清, 网络广告商们各自为政,有的使用CPM和CPC计费,有的干脆采用包月的形式,不管效果好坏 ,不管访问量有多少,一律一个价。尽管现在很多大的站点多已采用CPM和CPC计费,但很多 中小站点依然使用包月制。

 7.PFP(Pay-For-Performance) 按业绩付费

著 名市场研究机构福莱斯特(Forrerster)研究公司最近公布的一项研究报告称,在今后4年 之内,万维网将从目前的广告收费模式——即根据每千次闪现(impression)收费——CPM(这 亦是大多数非在线媒体均所采用的模式)变为按业绩收费(pay-for-performance)的模式。

 8.其他计价方式

某些广告主在进行特殊营销专案时,会提出以下方法个别议价:
 (1)CPL(Cost Per Leads):以搜集潜在客户名单多少来收费;
(2)CPS(Cost Per Sales):以实际销售产品数量来换算广告刊登金额。

2006年7月27日星期四

远望系列---web书签+个性化搜索

Web 2.0的出现,AJAX的逐渐广泛运用,使得网络上出现了越来越多的奇思妙想。总体的趋势看,原先在本地pc上运行的程序,都被搬移到了网络上,通过浏览器操作。这中趋势受益于网络的普及、带宽的增加、硬件成本的降低与性能的提高,以及搜索技术、网络体系结构的发展。

dil.icio.us提供了Web 书签, Google提供了越来越灵活的搜索。Google
已经可以提供只在某一级域名下搜索指定内容,但是,如果想要在多个指定的网站范围内搜索关键字呢?

在多个指定的网站中同时搜索一个关键词,这个功能是有实际需求的,例如,你想要找寻一篇关于linux device driver的文章,只想在
Linux Journal/ Linux Magazine Online / freesoftwaremagazine
三个网站中查找,因为你确定曾经在这三个网站中的某一个看见过类似的文章,并且你也不想让搜索结果中出现其它网站上的"干扰"信息。再比如你想要在几个著名的人才交流网站上找一份工作的时候。

更进一步,或许你早已经拥有自己经常查找某类信息的几个网站,它们已经在你的web书签中拥有相同的tag。如果"web书签"和"多个网站中搜索"两项联系起来,那么当你搜索时,你不用每次都手工的指定在哪几个网站中进行搜索,而是简单的写入关键词、填写(或者勾选)web书签的某个tag,然后点"搜索"按钮....哈哈,你得到了它们!

数据中挖掘信息,组合信息,表现信息,都会蕴藏着有趣的东西....

2006年4月6日星期四

远望系列---在Blog社区中掘金

题外话
称其灵感也好,瞎扯也罢,只是想记录突然产生的想法。随便起了个名字叫做"远望"系列,目的在于从眼前具体的工作中脱离出来,发呆空想一番,改变一下大脑的兴奋点。我相信,长久的专注于专业学习会让我僵化。

正文
如今的Blog风早已席卷了全球,为每个个体提供个性化的空间从而构建起一个虚拟的网上社区也已经不再仅仅局限于文字加插图的服务,很快出现了照片( flikr.com)、视频(??)、书签(del.icio.us)、rss等不同内容与形式的社区。

如同现实社会中总有奇人异事出现一样,在这种由个体构建起来的虚拟社区中蕴含着无数可以吸引群体眼球的东西,搞笑的图片、极限运动的短片、新闻链接、技术线索.... 这些信息分散在茫茫社区之中期待着大家的发掘。谈到"发掘",现有社区技术在于Search Bar、 Tags、Top10 reference/vote 等等,也即对信息的关键词搜索、分类、其他个体的评价等处理。依靠这些"发掘"方式我们最终得到的仍然是分散的来自每个个体的信息,例如:我们通过"Party" 在flikr.com中搜索到了全球各地人们的各种聚会照片,其中的一部分让我们充分领略了其他人的生活方式,但仍然有很多照片是了无生趣的。 简单的归类和查询使得我们得到的信息中很大比重是我们以及其他大多数人并不关心的信息(虽然这新信息的发布者正对其津津乐道)。

如同电视里播放的家庭滑稽录像,将社区中容易吸引大多数人眼球的信息整合起来,或许会成为社区网站提供的一项新服务。将所有在party上搞怪出糗的照片做一个剪辑,或者将所有猫狗大战的短片编辑起来,将会更加的吸引人。

整合的工作不仅可以由社区所属的网站制作,更可以由社区中的任意个人制作。如今的Blogger使得每个人都成为了作家,那么届时就会出现集编辑、制作、主持、导演为一体的个人或者小团体,而他们的创作素材完全来自于社区。

如果真的出现,那么这不单单会成为一波继blog文化后的新兴潮流,而且将带来新的盈利模式。通过含金量更高的图片拼贴、视频剪辑可以吸引更多的用户,聚拢人气,对现有的以广告点击盈利的模式有所促进;同时,如彩玲制作者一样,通过向网站兜售自己制作的剪辑,也可以使得网上电台获得盈利。

2006年3月7日星期二

[转载]Google Hack - 把 Google 作为代理服务器

这篇文章中介绍了一个方法,用 Google 的翻译工具可以把 Google 作为免费的代理服务器来用。具体就是在下面的URL的最后换上你要访问的网站域名,然后在浏览器中打开这个 Google 的网址即可。
访问英文站: http://www.google.com/translate?langpair=en|en&u=www.wikipedia.org
中文站: http://www.google.com/translate?langpair=zh-CN|zh-CN&u=sizkim.blogspot.com (也就是本blog,嘿嘿)

2006年1月17日星期二

FireFox 推 荐 插 件

最后更新:2006.2.25
(*)记号的为目前使用的,其他的为曾经试用过的

1. All-in-One Gestrues (*)
鼠标手势,可以自己定义的。本身有一套默认的,和MyIE、Opera或者GreenBrowser默认
的都差不多。

2.Download Statusbar (*)
用FireFox自带的下载管理器下载时,在状态栏显示下载情况。

3.FlashGot (*)
在鼠标右键中添加对外部下载程序的关联,我用FlashGet,好像就是为了它。不知道对
NetAnts支持不。

4.Auto Copy
如同linux终端里面用鼠标选中的字直接被拷贝,而不用按Ctrl+C一样。对网页文字的自
动拷贝。

5.ForecastFox
当前天气情况以及近期天气预报,在状态栏显示。

6.Sage (*)
rss订阅。我订了新浪新闻,在rss.sina.com.cn

7.Tabbroser Preferences
8.Tabbroser Extensions (*)
和MyIE、Opera、GreenBrowser一样的Tab方式浏览。

9.Add Bookmark Here
对Bookmark的每一级都加上“AddBookmark Here”选项,这个GreenBrowser里面有。

10.Sort Bookmarks

11.Flashblock (*)
对网页中的Flash进行阻拦,然后由你决定是否放映。

12.Adblock
非常智能的广告过滤器,不经任何设置已经可以拦截很多漂浮广告和动画。

13.Mozilla Archive Format
对mht格式文档的支持,好像Opera不可以,我没有注意过。

14.Gmail Notifier (*)
在statusbar 上出现一个Gmail 信箱自动提醒

15.IE Tab (*)
在FF中使用IE Core打开当前网页,有了它就可以彻底抛弃IE、Maxthon了

16. Minimize to Tray (*)
最小化到System Tray

17. Furl Tools
http://www.furl.net网站推出的插件。提供管理个人收藏夹的服务,于是,无论我在办
公室还是宿舍,或者回到新疆,都可以使用统一的书签了。关于书签,还可以利用“google个性
主页”,以及“google搜索历史”

18. del.icio.us (*)
web2.0的一个应用,将个人书签保存在网络上,在任何地方均可访问,跳出了私人电脑的
限制。

19. ScrapBook
将网页分类保存到本地文件夹,并提供网页的修改功能。

Codesign Comes to Virtex-II Pro and MicroBlaze Systems

http://www.xilinx-china.com/publications/xcellonline/partners/xc_celoxica44.htm


Codesign Comes to Virtex-II Pro and MicroBlaze Systems
by Chris Sullivan, Director of Strategic Alliances, Celoxica chris.sullivan@celoxica.com (11/25/02)

Develop your hardware and software in a single, integrated environment.

Virtex-II Pro? FPGAs are powerful system-level devices, replacing microprocessors and ASICs in many new applications. This shift in design strategies necessitates a corresponding shift in the way programmable logic designs are created and deployed in electronic products. To efficiently manage your software and hardware design in these programmable systems, you must now move away from legacy ASIC design methods to a codesign methodology that gives you greater choice in the level of design abstraction.

Codesign

Codesign is a process in which you use similar methods, and sets of connected tools and languages, for both hardware and software design. Codesign helps shorten development time by enabling the concurrent development of hardware and software, and by allowing software to be developed on "virtual hardware platforms" before the final hardware is ready. In addition, a top-down approach enhances your ability to analyze and tackle system partitioning and verification by enabling you to explore the design space fully. This enables more informed consideration of hardware/software tradeoffs and leads to better Quality of Design (QoD). Reducing the risks that arise from incorrect or changing specifications can help avoid the time-consuming and expensive optimization of an incorrect partition (which leads inevitably to a sub-optimal design) and increases your chances of first-time success.

Programmable Systems Require a Codesign Methodology

Historically, FPGA hardware was designed using techniques and languages borrowed from ASIC design methods – methods that are very different from those used to develop software or embedded systems. Up to now, there was a huge difference between these disciplines and their methodologies.

For example, current methods for embedded systems design require that hardware and software be specified and designed separately. Typically, C/C++ or a block-based methodology is used for the system specification. Once behavior has been fixed, the specification is then delegated to the (separate) hardware and software engineering teams, which code in different languages: HDLs (Hardware Description Languages) for the hardware, C/C++ for the software. While the system partition can be informed by profiling the specification or legacy software code, the partitioning is often decided in advance. And, because changes to the partition can necessitate extensive redesign elsewhere in the system (interfaces between the hardware and software, for example), that decision is adhered to as much as possible. The deficiencies of this methodology are clear:

  • Lack of a unified hardware-software representation can lead to difficulties in verification of the entire system, and hence to incompatibilities across the hardware/software boundary.
  • Defining a system partition in advance can lead to sub-optimal designs; incorrect partitioning requires costly refinement and is detrimental to QoD.
  • Hardware partitions of the system specification or legacy software code require time-consuming (and sometimes error-prone) rewriting into HDL.
  • Lack of a well-defined and flexible codesign methodology makes specification revision difficult and affects time to market.
While it is not yet possible to synthesize efficient hardware and software from a single language description, a codesign methodology that supports partitioning and co-verification, multiple languages, and tool interoperability is nevertheless invaluable when designing high-performance systems using Virtex II Pro FPGAs and MicroBlaze? processors. Such a methodology makes it possible to:
  • Prototype the system more easily and explore the design space better to identify the optimal design solution.
  • Use generic hardware/software interfaces for system co-simulation and verification, using the software code as a testbench throughout.
  • Implement changes to partitioning decisions – if required – much later in the design cycle.
  • ? Target different hardware platforms more easily and even change the target platform later in the design cycle than would otherwise be possible.
  • Drive system implementation from correct levels of abstraction.

The benefits of fusing separate design approaches into an effective and more "integrated software-compiled system design" flow that uses top-down design to tackle system partition, verification, and implementation are significant.

Working together, Celoxica and its strategic partners such as Wind River and Xilinx have developed a unique codesign flow and methodology (Figure 1) for Virtex-II Pro systems using MicroBlaze processors.

Figure 1
Figure 1 - Codesign flow for programmable systems with the flexibility for mixed language description interoperability

Software-Compiled System Design for Programmable Systems

Fundamental principles of the codesign methodology are:

  • A top-down, idea-to-implementation flow
  • A common higher-level language base for hardware and software design
  • The distinction of processing fabric at correct levels of abstraction
  • Interoperability with best-in-class hardware and embedded software tools
  • Codesign API standards (for example, the DSM – Data Streaming Manager), which enable easy interfacing between software and hardware for partitioning, verification, and implementation.

To make software-compiled system design possible, you need an environment that brings together the efficiencies of higher-level languages and the capabilities of powerful partition, verification, and design implementation.

DK Design Suite
The DK Design Suite enables you to enter system descriptions in higher-level programming languages, and to simulate and debug that code using a familiar, friendly integrated development environment (IDE). Block-based design and multiple languages are supported for simulation including C, C++, SystemC, HDLs, and Handel-C.

The package includes the Nexus-PDK co-verification environment, which also makes it possible to drive the entire functional verification process for the system with higher-level code.

Nexus PDK
Nexus-PDK is a powerful co-verification tool that allows you to simulate system functionality in multiple higher-level lan-guages, and to continue to use these models through to design implemen-tation by supporting co-simulation of software and hardware. Nexus communicates directly during simu-lation with popular third-party hard-ware RTL simulators and software ISS environments.

Handel-C
Handel-C, which is based on ANSI-C, has an added set of simple extensions for hardware development. These include:

  • Flexible data widths
  • Parallel processing
  • Communication between parallel threads.

In addition, Handel-C uses a simple timing model that enables you to control pipelining without adding definitions for specific hardware. Handel-C also eliminates the need to code finite state machines exhaustively by providing the ability to describe serial and parallel execution flows.

Its familiar language has formal semantics for describing system functionality and complex algorithms that produce substantially shorter and more readable code than RTL-based representations. The level of design abstraction is above RTL (Register Transfer Level) but below the behavioral level, and everything that can be described in the language may be translated to hardware.

DSM
DSM (Figure 2) is a portable hardware-software codesign API that offers a simple and transparent interface for transferring multiple independent streams of data between hardware and software. DSM is independent of both bus/interconnects and operating systems. It consists of two parts: an OS-independent API for the FPGA application, and an API for ANSI-C or the software environment. In operation, each side opens a number of uni-directional ports; a "write to a port" on one side is then matched by a "read" on the other. In this way, multiple software applications can independently access multiple reconfigurable hardware resources using very few API calls.

Figure 2
Figure 2 - DSM system overview

In Figure 3 you can see how these solutions integrate with best-in-class embedded software tools from Wind River and Xilinx programmable systems to deliver a comprehensive software-compiled system design methodology.

Figure 3
Figure 3 - Example HLL tool-chain

The key elements of the methodology are:

  • A minimal tool chain – comprising the Celoxica DK design suite, Wind River's XE (Xilinx Edition) embedded software tools, and Place and Route from Xilinx.
  • A common language base – C and Handel-C, with the flexibility for inter-operability with mixed language descrip-tions, such as HDLs and SystemC.
  • API standards for common interfacing and platform abstraction – Celoxica PAL for platform abstraction, and Celoxica DSM for hardware/software integration.

Profiling and Partitioning

Profiling and partitioning are key to any codesign methodology and help identify optimal design methods early in the design cycle. In the software world, the profiler is mostly used as an analysis tool to examine the runtime behavior of a program. Profiler information helps you determine which sections of code are working efficiently and which are not. Profiling also gives you information about where the program spent its time, and which functions called which other functions while it was executing. In this way, profiling shows which pieces of the program are slower than expected and thus might be candidates for off-loading into hard-ware for coprocessor acceleration. It can also highlight which functions are being called more – or less often – than expected.

But profiling tools were developed to fine-tune software – making applications run better and identifying candidates for rewriting – not for system partitioning. Although profiling code is an extremely useful exercise for informing partitioning decisions, it should not be relied upon exclusively. For example, due to latency between the system boundary and interfaces, it makes sense to minimize dataflow between the hardware and software. And yet, software profiling tools do not explore dataflow over the hardware/software boundary. You can, however, deduce this dataflow through designer scrutiny of the code and by hardware/software coverification using API calls for run-time test.

To see how software-compiled system design can best be deployed for Virtex-II Pro FPGAs and MicroBlaze processors, let's use a simple design example within the context of codesign.

Codesign Methodology Design Example
In this example, we have a system that contains a GUI, an image compression engine, an encryption engine, and a control path through which we issue commands to the image compressor (Figure 4).

Figure 4
Figure 4 - Simple codesign example

  1. First, we examine the system functionality against the project requirements, identify obvious system partitions, and also identify functions that will require further design investigation (such as those functions for which the optimum design partition is not immediately apparent).

    The GUI is an obvious candidate for software implementation; it is sequential and does not require processor-intensive resources. Likewise, the encryption engine is also a candidate for hardware implementation; it is parallel and integer-based. The partition-ing of the compression function, however, is less clear and is targeted for profiling, iterative partition, and design exploration.

  2. We move the compression function into software and obtain benchmarking information to provide a baseline for partition assessment. The software code can be used as a test bench throughout to support verification.
  3. With the function still in software, we use the DSM API to interface to the hardware component (Figures 5 and 6). We then begin to port blocks of the software to Handel-C for hardware prototyping, testing, and verifying at each stage. This process is relatively simple, because there is a common language base and, most importantly, a common level of abstraction for the software and the hardware. We also move the DSM port to enable the new partition to continue testing and verification at each stage

    Figure 5
    Figure 5 - DSM API port for hardware interface

    .

    Figure 6
    Figure 6 - Sample code showing DSM calls

  4. Having completed the partition and debugging, we cosimulate to verify the effectiveness and efficiency of the partition, as measured against system con-straints and design requirements.
  5. We now enter what is effectively the partitioning cycle, in which we begin to reiter-ate and explore different partitions and design scenarios through testing and verification, using the simple procedure out-lined in steps 3 and 4. This is an innovative process-driven approach to partitioning.
  6. The partitioning cycle produces a number of partition alternatives. We now consider these alternatives, map them to our design requirements or system constraints (such as device size, target platform, bandwidth, and so on), and select the optimum partition for QoD.
  7. We simulate and verify the partitioned system, using compiled C/C++ combined with the Handel-C compiled for the Nexus PDK simulator. For speed and efficiency, the cosimulation uses DSM Sim and PAL (Platform Abstraction Layer) Sim as virtual interconnects and virtual peripherals, respectively.
  8. The system is cosimulated and verified at a cycle-accurate level, using Nexus PDK, combined either with an ISS (Instruction Set Simulator) or ModelSim running a Swift model of the target processor.
  9. We recompile the system for the target platform and implement the design. The target platform is supported by DSM and by a PAL layer that provides a portable API for accessing on-board peripherals, such as RAM, video, and generic data I/O. Thus, the application written using PAL and DSM APIs can be ported to new platforms simply by recompiling. This supports design reuse and application portability, and helps address the issue of design obsolescence.

Conclusion

According to Gary Smith, Dataquest's chief electronic design automation analyst, "Today the biggest challenge in EDA is to resolve the incompatibility of the hardware design methodology and the software design methodology." Software-compiled system design delivers an advanced methodology that offers significant advantages to hardware engineers, embedded software engineers, firmware engineers, and systems architects.

For more information see www.celoxica.com or contact chris.sullivan@celoxica.com.

1 P. Garrault, Synthesis Tool Enhancements for Virtex Architectures, Xilinx, 2002.
2 Hardware/Software Co-Design Group, Polis A Framework for hardware-software co-design of embedded systems, EECS, University of California, Berkeley.

Printable PDF version of this article. PDF logo (11/25/02) 195 KB

2006年1月14日星期六

啦啦啦,google变成了一个proxy

http://www.google.com/gwt/n

google开放了新功能:任意填入一个网站的 URL,如果不想显示图像,只需选中“ No Images ”,之后点按钮“Go”,就给你生成该网站的手机(或 PDA)版网页。

试试看 zh.wikipedia.org ,嘿嘿,虽然样子丑了点,总好过看不到。哈哈,我被封掉的google blog也可以看见了。

会不会过几天,google就被咔嚓了 :(

btw,这个看起来很像lynx