Skip to content

Commit

Permalink
Fix up configuration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LAK132 committed Nov 29, 2022
1 parent 4e92b35 commit bf6b965
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/xilinx/tests/spartan6/configuration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ TEST(ConfigurationTest, DISABLED_CheckForPaddingAfterIOBFrame) {
frames.getFrames(), test_part);
// createType2ConfigurationPacketData should add a 16-bit pad word after
// after the IOB frame
EXPECT_EQ(packet_data.size(), 3 * 65 + 1);
EXPECT_EQ(packet_data.frames.size(), 1);
EXPECT_EQ(packet_data.frames[0].data.size(), 3 * 65 + 1);

std::vector<uint32_t> idcode{0x1234};
std::vector<uint32_t> cmd{0x0001};
Expand Down Expand Up @@ -182,7 +183,7 @@ TEST(ConfigurationTest, DISABLED_CheckForPaddingAfterIOBFrame) {
static_cast<unsigned int>(0x1),
ConfigurationPacket<Spartan6::ConfRegType>::Opcode::Write,
Spartan6::ConfRegType::FDRI,
absl::MakeSpan(packet_data),
absl::MakeSpan(packet_data.frames[0].data),
},
};

Expand Down
5 changes: 3 additions & 2 deletions lib/xilinx/tests/xc7series/configuration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ TEST(ConfigurationTest, CheckForPaddingFrames) {
// extra padding frames are added at the end of the creation of the data
// overall this gives us: 5(real frames) + 4*2 + 2 = 15 frames, which is
// 15 * 101 = 1515 words
EXPECT_EQ(packet_data.size(), 15 * 101);
EXPECT_EQ(packet_data.frames.size(), 1);
EXPECT_EQ(packet_data.frames[0].data.size(), 15 * 101);

std::vector<uint32_t> idcode{0x1234};
std::vector<uint32_t> cmd{0x0001};
Expand Down Expand Up @@ -307,7 +308,7 @@ TEST(ConfigurationTest, CheckForPaddingFrames) {
static_cast<unsigned int>(0x1),
ConfigurationPacket<Series7::ConfRegType>::Opcode::Write,
Series7::ConfRegType::FDRI,
absl::MakeSpan(packet_data),
absl::MakeSpan(packet_data.frames[0].data),
},
};

Expand Down

0 comments on commit bf6b965

Please sign in to comment.