Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6049fa6f3971
Choose a base ref
...
head repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b6237ea6a460
Choose a head ref
  • 5 commits
  • 10 files changed
  • 1 contributor

Commits on Jun 9, 2017

  1. Copy the full SHA
    a9611c2 View commit details
  2. xc2bit: Move process_jed into the bitstream module

    This makes jed.rs only have .jed file logic and not other random bits of
    logic.
    ArcaneNibble committed Jun 9, 2017
    Copy the full SHA
    6cc0701 View commit details
  3. Copy the full SHA
    72ec963 View commit details
  4. Copy the full SHA
    fe7a666 View commit details
  5. Copy the full SHA
    b6237ea View commit details
20 changes: 18 additions & 2 deletions src/xc2bit/src/bin/xc2jedblank.rs
Original file line number Diff line number Diff line change
@@ -23,11 +23,27 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

//! Testing tool that prints out a "blank" but valid bitstream for the given part.
extern crate xc2bit;
use xc2bit::*;

fn main() {
let bitstream = XC2Bitstream::blank_bitstream("XC2C32A", "6", "VQ44").expect("failed to create bitstream");
let args = ::std::env::args().collect::<Vec<_>>();

if args.len() != 2 {
println!("Usage: {} <device>-<speed>-<package>", args[0]);
::std::process::exit(1);
}

let device_combination = parse_part_name_string(&args[1]);
if device_combination.is_none() {
println!("Requested part combination {} is invalid", args[1]);
::std::process::exit(1);
}

let (part, spd, pkg) = device_combination.unwrap();
let bitstream = XC2Bitstream::blank_bitstream(part, spd, pkg).expect("failed to create bitstream");

bitstream.write_jed(&mut ::std::io::stdout());
bitstream.write_jed(&mut ::std::io::stdout()).expect("failed to write jed");
}
4 changes: 3 additions & 1 deletion src/xc2bit/src/bin/xc2jeddump.rs
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

//! Testing tool that prints out a human-readable description of a bitstream
use std::fs::File;
use std::io::Read;

@@ -49,5 +51,5 @@ fn main() {
let bitstream_result = process_jed(&bits, &device_name);
let bitstream = bitstream_result.expect("failed to process jed");

bitstream.dump_human_readable(&mut ::std::io::stdout());
bitstream.dump_human_readable(&mut ::std::io::stdout()).expect("failed to print jed");
}
4 changes: 3 additions & 1 deletion src/xc2bit/src/bin/xc2jedroundtrip.rs
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

//! Testing tool that reads a .jed bitstream and writes it back out (hopefully identically)
use std::fs::File;
use std::io::Read;

@@ -49,5 +51,5 @@ fn main() {
let bitstream_result = process_jed(&bits, &device_name);
let bitstream = bitstream_result.expect("failed to process jed");

bitstream.write_jed(&mut ::std::io::stdout());
bitstream.write_jed(&mut ::std::io::stdout()).expect("failed to write jed");
}
Loading