blueecho's collection

누군가에게 "당신은 무엇을 잘하십니까?"라는 질문을 들었을때 바로 대답할것을 만들어보자~!!
        
분류 전체보기 (267)
NeWs (21)
배움생활 (107)
리눅스 (51)
SoC (29)
외부스터디 (2)
학교수업관련 (3)
일본어공부 (1)
ETC (21)
취미생활 (118)
끄적끄적 (5)
인생설계 (12)
Wish list (4)
리눅스 지름신 자전거 일본소설 영화감상 사진 연구실 생활 연구실생활 Fedora 솔카당
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
블로그 이동하였습니다.

 

배움생활/SoC에 해당하는 글 29개
2017.06.17   디지털 회로란? 
2013.11.01   Simulation시 $test$plusargs 사용관련 
2013.05.09   Synopsys Tutorial 관련 페이지 

  디지털 회로란? | 2017. 6. 17. 07:05 | 배움생활/SoC   

회사에서 세미나를 하는 도중 ASIC에서의 디지털 회로와 아날로그 회로의 차이에 대한 이야기가 오고 갔습니다.

전자과라면 아마 대학 1학년때 이후로는 당연히 알고 있는 내용이라고 간과하고 지냈던 것 같아 새록새록 하더라구요.

"RTL레벨, 즉 register기반의 설계를 가져가는 것이 기본이 아닌가?" 부터 "우리가 verilog로 설계하여서 만드는 디지털 회로라는 것도 최종적으로 보면 아날로그 회로가 아닌가?"등의 이야기들이 왔다갔다 했는데요.

전자의 이동을 이용한 전기회로라는 것은 아날로그든 디지털이든 동일한 것이지만 디지털의 경우는 output에 대해서 0 아니면 1로만 구분한다는 것이 다른 것이겠지요. (물론, unstable상태가 있긴하지만...)

동일한 회로를 아날로그로 사용할 수 있고 디지털로도 사용할 수 있다고 생각했습니다. 뭐, 그 회로가 쓰레기이든 아니든 간에요.


공부를 하다가 보면 단어와 그 개념에 대해서 모호하게 할때가 많은 것 같습니다. 

이로 인해 여러가지 개념들의 이미지가 유사하게 느껴져 헷갈릴 때가 많아요. (물론, 저의 경우만 일 수도 있지만요.)

뭐 이런 이미지가 아닐까 정도로 넘어가는 때가 많은데 덕분에 다시한번 개념에 대해서 회고할 수 있었던 것 같습니다.

 

ps. 공부란 끝이 없네요.

'배움생활 > SoC' 카테고리의 다른 글

Simulation시 $test$plusargs 사용관련  (0) 2013.11.01
Synopsys Tutorial 관련 페이지  (0) 2013.05.09
TSMC 28nm 공정  (0) 2012.12.20
Setup/Hold violation  (0) 2012.02.23
유지보수가 어렵게 코딩하는 방법  (0) 2011.12.16


  Simulation시 $test$plusargs 사용관련 | 2013. 11. 1. 17:06 | 배움생활/SoC   

Extracting Values of Plusargs inside a simulation

Contributed by
Chris Spear

This article as well as many others appears in Chris' website.

1. Introduction

$value$plusargs (string, variable)

This system function searches the list of plusargs (like the $test$plusargs system function) for a user specified string. If a string is found, the remainder of the string is converted to the type specified in the user string and the resulting value stored in the variable provided. If a string is found the function returns the value 1'b1. If no string is found matching, the function returns the value 1'b0 and the variable provided is not modified.

The user string must be of the form: "'plusarg_string''format_string'". The plusarg string is a name followed by either = or + . The format strings are the same as the $display system tasks. These are the only valid ones (upper and lower case as well as a leading 0 forms are valid):

%b - binary conversion
%d - decimal conversion
%e - real exponential conversion
%f - real decimal conversion
%g - real decimal or exponential conversion
%h - hexadecimal conversion
%o - octal conversion
%s - string (no conversion)
%x - (undergound equivalent for %h)

The first string, from the list of plusargs provided to the simuator, that matches the plusarg_string portion of the string specified by the user will be the plusarg string available for conversion. The remainder string of the matching plusarg (the remainder is the part of the plusarg string after the portion that matches the users plusarg_string) will be converted from a string into the format indicated by the format string and stored in the variable provided.

If the size of the variable is larger than the value after conversion, the value stored is zero padded to the width of the variable. If the variable can not contain the value after conversion, the value will be truncated. If the value is negative, the value shall be considered larger than the variable provided. If characters exist in the string available for conversion that are illegal for the specified conversion, the register should be written with the value 'bx.

2. Examples:

<simulator> +FINISH=10000 +TESTNAME=this_test +FREQ=5.6666 +FREQUENCY

// Get clock to terminate simulation if specified.

if ($value$plusargs("FINISH=%d", stop_clock)) begin
repeat (stop_clock) @(posedge clk);
$finish;
end

// Get testname from plusarg.

if ($value$plusargs("TESTNAME=%s", testname)) begin
$display("Running test %0s.", testname);
startTest();
end

// Get frequency from command line; set default if not specified.

if (!$value$plusargs("FREQ=%0F", frequency))
frequency = 8.33333; // 166MHz;

forever begin
#frequency clk = 0;
#frequency clk = 1;
end

This code would have the following effects:

1. The variable 'stop_clock' obtains the value 10000.
2. The variable 'testname' obtains the value 'this_test'.
3. The variable 'frequency' obtains the value '5.6666'; note the final plusarg +FREQUENCY does not affect the value of the variable 'frequency'.

3. Files

The main PLI application is in file value.c. A .tab file for VCS environment will contain the following line.

	$value$plusargs     check=value_check call=value_call size=32 acc=rw:%TASK
	

The corresponding veriuser.c for Verilog-XL is here.

4. Using $value$plusargs with VCS

4.1 Passing integers

The Verilog code:

module test;
integer i, r;

initial begin
r = $value$plusarg("myint=%d", i);
$display("Value is %0d", i);
end

endmodule

invoked from Unix with:

> simv +myint=22

will print:

Value is 22

4.2 Passing strings

The Verilog code:

module test;
reg [1000:0] string;

initial begin
$value$plusarg("mystr=%s", string);
$display("String is %0s", string);
end

endmodule

invoked from Unix with:

> simv +mystr=cbs

will print:

String is cbs

4.3 Passing filenames

To pass a file name from the command line into a model, use a plus argument.

The Verilog code:

module test;
reg [100:0] s1;

initial begin
$value$plusarg("MEM=%s", s1);
$readmemh (s1, memory);
end

endmodule

invoked from Unix with:

> simv +MEM=pgm.txt test.v

will read the file "pgm.txt" . At run time you can now specify a different name, such as +MEM=new.txt This can also be used with SDF file names.

4.4 Changing values at run-time

If you compile a model in VCS with a plus argument, it is "burned" into the simv as a default and does not have to be given at run time.

> vcs -R model.v +myint=22

will print "Value is 22". Running the executable with no switch will print the same thing:

> simv

Value is 22

Running with a different switch will cause the new value to print:

> simv +myint=44

Value is 44

4.5 Compilation

To compile this code with VCS, use:

vcs value.c -P value.tab -CFLAGS "-I${VCS_HOME}/`vcs platform`/lib" mymodel.v

4.6 Limitations

VCS will give the following compile message which can be ignored:

Unknown compile time plus argument ignored: 'myint=22'

Use +plusarg_ignore to turn off this message. If you want to use the plusargs from the compile step during simulations, use +plusarg_save.

These plus arguments can not be in a -f file with VCS 4.0.x and earlier.

'배움생활 > SoC' 카테고리의 다른 글

디지털 회로란?  (0) 2017.06.17
Synopsys Tutorial 관련 페이지  (0) 2013.05.09
TSMC 28nm 공정  (0) 2012.12.20
Setup/Hold violation  (0) 2012.02.23
유지보수가 어렵게 코딩하는 방법  (0) 2011.12.16


  Synopsys Tutorial 관련 페이지 | 2013. 5. 9. 10:51 | 배움생활/SoC   

검색중에 찾은 synopsys tool관련 tutorial페이지가 있어서 링크를 올리도록 하겠습니다,

참고하세요~~

http://venividiwiki.ee.virginia.edu/mediawiki/index.php/ToolsSynopsysMain

'배움생활 > SoC' 카테고리의 다른 글

디지털 회로란?  (0) 2017.06.17
Simulation시 $test$plusargs 사용관련  (0) 2013.11.01
TSMC 28nm 공정  (0) 2012.12.20
Setup/Hold violation  (0) 2012.02.23
유지보수가 어렵게 코딩하는 방법  (0) 2011.12.16


#1 #2 #3 #4 #··· #10
 
     
- Home
- Guestbook
- Manage - Location
- Tag - Post