electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

What will synthesizer do when there is a race condition?


Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> What will synthesizer do when there is a race condition?
Author Message
kelvin_sg



Joined: 17 Aug 2004
Posts: 103
Location: Singapore


Post11 Jan 2008 9:53   

What will synthesizer do when there is a race condition?


I was studying codes written by others, one style is confusing me,

Code:

always @(posedge clk or negedge rst) begin
if (rst == 1'b0) begin
   dat <= 10'd0;
end
else begin
   if (sel0) begin
      dat <= dat0;
   end
   if (sel1) begin
      dat <= dat1;
   end
end
end


The code is from a well known IC design companies, whom we outsource
RTL design to.

Will synthesizer do well with this? I was taught not to use this style previously.
Back to top
vinayshivakumar



Joined: 17 Dec 2007
Posts: 27


Post11 Jan 2008 10:52   

Re: What will synthesizer do when there is a race condition?


Not a great way to code , but it will be implemented as a mux (or equivalent) followed by a flop (with asynchronous reset) ...
However there might be an inferred latch - due to the absence of an else statement for the if statement

How do you see the race condition happening ???
Back to top
Google
AdSense
Google Adsense




Post11 Jan 2008 10:52   

Ads




Back to top
kelvin_sg



Joined: 17 Aug 2004
Posts: 103
Location: Singapore


Post11 Jan 2008 11:26   

Re: What will synthesizer do when there is a race condition?


vinayshivakumar wrote:
Not a great way to code , but it will be implemented as a mux (or equivalent) followed by a flop (with asynchronous reset) ...
However there might be an inferred latch - due to the absence of an else statement for the if statement

How do you see the race condition happening ???


so it's not called a race.. Exclamation but I am concerned with condition when "sel0&sel1 == 1'b1"

AFAIK Simulation-wise, it will behave like the table, but I am not sure how
synthesizer will deal with it. That's why I ask.
The code will be used in both design compiler and Cadence's RTL compiler.



Quote:


sel0 sel1 dat
0 0 dat(-1) <-unchange
1 0 dat0
0 1 dat1
1 1 dat1


always @(posedge clk or negedge rst) begin
if (rst == 1'b0) begin
dat <= 10'd0;
end
else begin
if (sel0) begin
dat <= dat0;
end
if (sel1) begin
dat <= dat1;
end
end
end
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> What will synthesizer do when there is a race condition?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Race Condition (2)
RACE AROUND CONDITION (1)
Race condition check in Verilog (3)
RACE AROUND CONDITION nd VERILOG qns (1)
verilog race condition on Async Reset (2)
What will happen if there is no CLK in (1)
Analog Switch- what will happen if there is no clk in? (3)
Post-synthesis gate-level VCS simulation (race condition) (2)
what is cross talk ?.when will it is come?how to reduce it? (2)
what is DSM and DFY?when u will get this topic? (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS